aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl/opengl-sys.h
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-08-13 11:57:39 +0200
committerGitHub2016-08-13 11:57:39 +0200
commit68a15c10bec09edf37b4b357e3efbc055a402bdf (patch)
tree69d208325eeaa33a890ee66d27607e7ecb778789 /backends/graphics/opengl/opengl-sys.h
parent6a9923ec07d019cbbf8c35e36030391dac256e79 (diff)
parent4d120800fa63433e2fc2d76d69178431d53ba29e (diff)
downloadscummvm-rg350-68a15c10bec09edf37b4b357e3efbc055a402bdf.tar.gz
scummvm-rg350-68a15c10bec09edf37b4b357e3efbc055a402bdf.tar.bz2
scummvm-rg350-68a15c10bec09edf37b4b357e3efbc055a402bdf.zip
Merge pull request #790 from salty-horse/clang_fixes
ALL: Don't use 'defined' in macro definitions
Diffstat (limited to 'backends/graphics/opengl/opengl-sys.h')
-rw-r--r--backends/graphics/opengl/opengl-sys.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/backends/graphics/opengl/opengl-sys.h b/backends/graphics/opengl/opengl-sys.h
index 4495128f32..7b531cc140 100644
--- a/backends/graphics/opengl/opengl-sys.h
+++ b/backends/graphics/opengl/opengl-sys.h
@@ -48,9 +48,15 @@
// 0 - Force OpenGL context
// 1 - Force OpenGL ES context
// 2 - Force OpenGL ES 2.0 context
-#define USE_FORCED_GL (defined(USE_GLES_MODE) && USE_GLES_MODE == 0)
-#define USE_FORCED_GLES (defined(USE_GLES_MODE) && USE_GLES_MODE == 1)
-#define USE_FORCED_GLES2 (defined(USE_GLES_MODE) && USE_GLES_MODE == 2)
+#ifdef USE_GLES_MODE
+ #define USE_FORCED_GL (USE_GLES_MODE == 0)
+ #define USE_FORCED_GLES (USE_GLES_MODE == 1)
+ #define USE_FORCED_GLES2 (USE_GLES_MODE == 2)
+#else
+ #define USE_FORCED_GL 0
+ #define USE_FORCED_GLES 0
+ #define USE_FORCED_GLES2 0
+#endif
// On Tizen we include the toolchain's OpenGL file. This is something we
// actually want to avoid. However, since Tizen uses eglGetProcAddress which