瀏覽代碼

Merge branch 'n67094-master'

Andre Weissflog 5 月之前
父節點
當前提交
30fbac8d3a
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      util/sokol_imgui.h

+ 7 - 1
util/sokol_imgui.h

@@ -2380,7 +2380,13 @@ SOKOL_API_IMPL void simgui_setup(const simgui_desc_t* desc) {
         #if defined(__cplusplus)
         #if defined(__cplusplus)
             ImGuiPlatformIO* pio = &ImGui::GetPlatformIO();
             ImGuiPlatformIO* pio = &ImGui::GetPlatformIO();
         #else
         #else
-            ImGuiPlatformIO* pio = _SIMGUI_CFUNC(GetPlatformIO)();
+            #if defined(CIMGUI_INCLUDED)
+                // 'original' cimgui
+                ImGuiPlatformIO* pio = _SIMGUI_CFUNC(GetPlatformIO_Nil)();
+            #else
+                // dear bindings cimgui
+                ImGuiPlatformIO* pio = _SIMGUI_CFUNC(GetPlatformIO)();
+            #endif
         #endif
         #endif
         pio->Platform_SetClipboardTextFn = _simgui_set_clipboard;
         pio->Platform_SetClipboardTextFn = _simgui_set_clipboard;
         pio->Platform_GetClipboardTextFn = _simgui_get_clipboard;
         pio->Platform_GetClipboardTextFn = _simgui_get_clipboard;