From 3c45ae2e9d07d253c6e0dd866c74f8cfc9cc5be5 Mon Sep 17 00:00:00 2001 From: jpark37 Date: Fri, 17 Sep 2021 21:12:52 -0700 Subject: [PATCH] libobs, libobs-opengl: Consistent near/far undef --- libobs-opengl/gl-subsystem.c | 6 +++++- libobs/graphics/graphics.c | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libobs-opengl/gl-subsystem.c b/libobs-opengl/gl-subsystem.c index db2deac99..4c33991bb 100644 --- a/libobs-opengl/gl-subsystem.c +++ b/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 */ diff --git a/libobs/graphics/graphics.c b/libobs/graphics/graphics.c index 4f3ee8905..19a23439b 100644 --- a/libobs/graphics/graphics.c +++ b/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