Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
GH Action committed Sep 20, 2024
1 parent 727f2c4 commit 89c4842
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/sokol/c/sokol_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2919,7 +2919,8 @@ static void _sgl_destroy_context(sgl_context ctx_id) {
// >>misc

static sgl_error_t _sgl_error_defaults(void) {
sgl_error_t defaults = {0};
sgl_error_t defaults;
_sgl_clear(&defaults, sizeof(defaults));
return defaults;
}

Expand Down
7 changes: 5 additions & 2 deletions src/sokol/c/sokol_imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -2200,15 +2200,13 @@ SOKOL_API_IMPL void simgui_setup(const simgui_desc_t* desc) {
ImGui::CreateContext();
ImGui::StyleColorsDark();
ImGuiIO* io = &ImGui::GetIO();
ImGuiPlatformIO* pio = &ImGui::GetPlatformIO();
if (!_simgui.desc.no_default_font) {
io->Fonts->AddFontDefault();
}
#else
igCreateContext(NULL);
igStyleColorsDark(igGetStyle());
ImGuiIO* io = igGetIO();
ImGuiPlatformIO* pio = igGetPlatformIO();
if (!_simgui.desc.no_default_font) {
ImFontAtlas_AddFontDefault(io->Fonts, NULL);
}
Expand All @@ -2220,6 +2218,11 @@ SOKOL_API_IMPL void simgui_setup(const simgui_desc_t* desc) {
if (!_simgui.desc.disable_set_mouse_cursor) {
io->BackendFlags |= ImGuiBackendFlags_HasMouseCursors;
}
#if defined(__cplusplus)
ImGuiPlatformIO* pio = &ImGui::GetPlatformIO();
#else
ImGuiPlatformIO* pio = igGetPlatformIO();
#endif
pio->Platform_SetClipboardTextFn = _simgui_set_clipboard;
pio->Platform_GetClipboardTextFn = _simgui_get_clipboard;
#endif
Expand Down

0 comments on commit 89c4842

Please sign in to comment.