浏览代码

libobs, libobs-opengl: Consistent near/far undef

jpark37 4 年之前
父节点
当前提交
3c45ae2e9d
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 5 1
      libobs-opengl/gl-subsystem.c
  2. 3 1
      libobs/graphics/graphics.c

+ 5 - 1
libobs-opengl/gl-subsystem.c

@@ -20,8 +20,12 @@
 #include "gl-subsystem.h"
 
 /* Goofy Windows.h macros need to be removed */
-#undef far
+#ifdef near
 #undef near
+#endif
+#ifdef far
+#undef far
+#endif
 
 /* #define SHOW_ALL_GL_MESSAGES */
 

+ 3 - 1
libobs/graphics/graphics.c

@@ -28,8 +28,10 @@
 #include "effect-parser.h"
 #include "effect.h"
 
-#ifdef _MSC_VER
+#ifdef near
 #undef near
+#endif
+#ifdef far
 #undef far
 #endif