瀏覽代碼

Error check: fixed build when using IMGUI_DISABLE_DEBUG_TOOLS.

ocornut 11 月之前
父節點
當前提交
4aeae5d718
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      imgui.cpp

+ 5 - 1
imgui.cpp

@@ -10227,10 +10227,14 @@ static void ImGui::ErrorCheckEndFrameSanityChecks()
 // Default implementation of ImGuiErrorLogCallback that pipe errors to DebugLog: appears in tty + Tools->DebugLog
 // Default implementation of ImGuiErrorLogCallback that pipe errors to DebugLog: appears in tty + Tools->DebugLog
 void    ImGui::ErrorLogCallbackToDebugLog(void*, const char* fmt, ...)
 void    ImGui::ErrorLogCallbackToDebugLog(void*, const char* fmt, ...)
 {
 {
+#ifndef IMGUI_DISABLE_DEBUG_TOOLS
     va_list args;
     va_list args;
     va_start(args, fmt);
     va_start(args, fmt);
-    ImGui::DebugLogV(fmt, args);
+    DebugLogV(fmt, args);
     va_end(args);
     va_end(args);
+#else
+    IM_UNUSED(fmt);
+#endif
 }
 }
 
 
 // Experimental recovery from incorrect usage of BeginXXX/EndXXX/PushXXX/PopXXX calls.
 // Experimental recovery from incorrect usage of BeginXXX/EndXXX/PushXXX/PopXXX calls.