From 1b130b2fcee74bf2d660693e95fdbf53532b7623 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 19 Feb 2021 05:51:40 +0300
Subject: [PATCH] undefine CreateThread, CreateSemaphore and CreateMutex for
windows
they are macros from windows headers, and SDL_syswm.h does include
windows.h
---
src/SDL20_include_wrapper.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/SDL20_include_wrapper.h b/src/SDL20_include_wrapper.h
index a1f139e..58cb832 100644
--- a/src/SDL20_include_wrapper.h
+++ b/src/SDL20_include_wrapper.h
@@ -94,7 +94,12 @@
#define BUILD_SDL 1
#include "SDL.h"
-#include "SDL_syswm.h"
+#include "SDL_syswm.h" /* includes windows.h for _WIN32 */
+#ifdef _WIN32
+#undef CreateThread
+#undef CreateSemaphore
+#undef CreateMutex
+#endif
#undef SDL_ReportAssertion
#undef SDL_SetError