浏览代码

Backends: OpenGL3: Add TargetConditionals.h (#4473) + standardize include

Siarhei Fiedartsou 4 年之前
父节点
当前提交
f8bad7e1e3
共有 3 个文件被更改,包括 5 次插入2 次删除
  1. 3 0
      backends/imgui_impl_opengl3.cpp
  2. 1 1
      backends/imgui_impl_opengl3.h
  3. 1 1
      backends/imgui_impl_sdl.cpp

+ 3 - 0
backends/imgui_impl_opengl3.cpp

@@ -105,6 +105,9 @@
 #include <GLES2/gl2ext.h>
 #endif
 #elif defined(IMGUI_IMPL_OPENGL_ES3)
+#if defined(__APPLE__)
+#include <TargetConditionals.h>
+#endif
 #if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV))
 #include <OpenGLES/ES3/gl.h>    // Use GL ES 3
 #else

+ 1 - 1
backends/imgui_impl_opengl3.h

@@ -42,7 +42,7 @@ IMGUI_IMPL_API void     ImGui_ImplOpenGL3_DestroyDeviceObjects();
 
 // Try to detect GLES on matching platforms
 #if defined(__APPLE__)
-#include "TargetConditionals.h"
+#include <TargetConditionals.h>
 #endif
 #if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) || (defined(__ANDROID__))
 #define IMGUI_IMPL_OPENGL_ES3               // iOS, Android  -> GL ES 3, "#version 300 es"

+ 1 - 1
backends/imgui_impl_sdl.cpp

@@ -57,7 +57,7 @@
 #include <SDL.h>
 #include <SDL_syswm.h>
 #if defined(__APPLE__)
-#include "TargetConditionals.h"
+#include <TargetConditionals.h>
 #endif
 
 #if SDL_VERSION_ATLEAST(2,0,4) && !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !(defined(__APPLE__) && TARGET_OS_IOS)