diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-04-04 17:16:54 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-04-04 17:16:54 +0200 |
| commit | fc82d9b086f7d28dbc7f14841b4e51e26e072884 (patch) | |
| tree | b25cbb84913b8ad5ab5c1bb19ab10b988e567a03 /util/sokol_imgui.h | |
| parent | 10e0bde19d863bd269e0fb100c4fb622113e196f (diff) | |
sokol_imgui.h: compatibility hack for original cimgui vs dear bindings cimgui
Diffstat (limited to 'util/sokol_imgui.h')
| -rw-r--r-- | util/sokol_imgui.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/sokol_imgui.h b/util/sokol_imgui.h index c63a5ddf..d4dc34c2 100644 --- a/util/sokol_imgui.h +++ b/util/sokol_imgui.h @@ -2380,7 +2380,13 @@ SOKOL_API_IMPL void simgui_setup(const simgui_desc_t* desc) { #if defined(__cplusplus) ImGuiPlatformIO* pio = &ImGui::GetPlatformIO(); #else - ImGuiPlatformIO* pio = _SIMGUI_CFUNC(GetPlatformIO_Nil)(); + #if defined(CIMGUI_INCLUDED) + // 'original' cimgui + ImGuiPlatformIO* pio = _SIMGUI_CFUNC(GetPlatformIO_Nil)(); + #else + // dear bindings cimgui + ImGuiPlatformIO* pio = _SIMGUI_CFUNC(GetPlatformIO)(); + #endif #endif pio->Platform_SetClipboardTextFn = _simgui_set_clipboard; pio->Platform_GetClipboardTextFn = _simgui_get_clipboard; |