Browse Source

Don't have Windows headers define min/max, in case they're defined by application code

Sam Lantinga 5 years ago
parent
commit
3efea5ea28
3 changed files with 9 additions and 0 deletions
  1. 3 0
      include/SDL_egl.h
  2. 3 0
      include/SDL_opengl_glext.h
  3. 3 0
      include/SDL_syswm.h

+ 3 - 0
include/SDL_egl.h

@@ -390,6 +390,9 @@ typedef enum {
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN 1
 #endif
+#ifndef NOMINMAX   /* don't define min() and max(). */
+#define NOMINMAX
+#endif
 #include <windows.h>
 
 #if __WINRT__

+ 3 - 0
include/SDL_opengl_glext.h

@@ -40,6 +40,9 @@ extern "C" {
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN 1
 #endif
+#ifndef NOMINMAX   /* don't define min() and max(). */
+#define NOMINMAX
+#endif
 #include <windows.h>
 #endif
 

+ 3 - 0
include/SDL_syswm.h

@@ -49,6 +49,9 @@ struct SDL_SysWMinfo;
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
+#ifndef NOMINMAX   /* don't define min() and max(). */
+#define NOMINMAX
+#endif
 #include <windows.h>
 #endif