summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2018-12-09 02:28:14 +0100
committerglx22 <glx22@users.noreply.github.com>2018-12-27 18:09:16 +0100
commitc540d7244531d501f16b485a3e45e358f98853be (patch)
tree4d270f06b2aa9b4f796d4828e5bfaf3c09cdd4b1 /src/video
parent8890926b0d1069aec7ef53fd84868a7a3ca02c05 (diff)
downloadopenttd-c540d7244531d501f16b485a3e45e358f98853be.tar.xz
Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32
Diffstat (limited to 'src/video')
-rw-r--r--src/video/dedicated_v.cpp6
-rw-r--r--src/video/sdl_v.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp
index aaadd9461..47fa64231 100644
--- a/src/video/dedicated_v.cpp
+++ b/src/video/dedicated_v.cpp
@@ -73,7 +73,7 @@ static void DedicatedSignalHandler(int sig)
}
#endif
-#if defined(WIN32)
+#if defined(_WIN32)
# include <windows.h> /* GetTickCount */
# include <conio.h>
# include <time.h>
@@ -150,7 +150,7 @@ const char *VideoDriver_Dedicated::Start(const char * const *parm)
ScreenSizeChanged();
BlitterFactory::GetCurrentBlitter()->PostResize();
-#if defined(WIN32)
+#if defined(_WIN32)
/* For win32 we need to allocate a console (debug mode does the same) */
CreateConsole();
CreateWindowsConsoleThread();
@@ -173,7 +173,7 @@ const char *VideoDriver_Dedicated::Start(const char * const *parm)
void VideoDriver_Dedicated::Stop()
{
-#ifdef WIN32
+#ifdef _WIN32
CloseWindowsConsoleThread();
#endif
free(_dedicated_video_mem);
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index f40c4b646..e96decb45 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -264,7 +264,7 @@ static void GetAvailableVideoMode(uint *w, uint *h)
*h = _resolutions[best].height;
}
-#ifdef WIN32
+#ifdef _WIN32
/* Let's redefine the LoadBMP macro with because we are dynamically
* loading SDL and need to 'SDL_CALL' all functions */
#undef SDL_LoadBMP
@@ -500,7 +500,7 @@ static uint ConvertSdlKeyIntoMy(SDL_keysym *sym, WChar *character)
}
/* check scancode for BACKQUOTE key, because we want the key left of "1", not anything else (on non-US keyboards) */
-#if defined(WIN32) || defined(__OS2__)
+#if defined(_WIN32) || defined(__OS2__)
if (sym->scancode == 41) key = WKC_BACKQUOTE;
#elif defined(__APPLE__)
if (sym->scancode == 10) key = WKC_BACKQUOTE;