From 79ad3e6203b825b7c16efba57698c9fe3b50b4a1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Jul 2019 16:55:01 +0200 Subject: [PATCH] - define _WIN32_WINNT to 0x600 (Vista) in the CMake project instead of littering all files with inconsistent settings for the target version. --- CMakeLists.txt | 2 +- src/d_anonstats.cpp | 1 - src/win32/hardware.cpp | 1 - src/win32/helperthread.cpp | 1 - src/win32/i_cd.cpp | 1 - src/win32/i_crash.cpp | 1 - src/win32/i_dijoy.cpp | 1 - src/win32/i_input.cpp | 5 ----- src/win32/i_keyboard.cpp | 1 - src/win32/i_main.cpp | 1 - src/win32/i_mouse.cpp | 1 - src/win32/i_rawps2.cpp | 1 - src/win32/i_specialpaths.cpp | 1 - src/win32/i_xinput.cpp | 1 - src/win32/st_start.cpp | 1 - 15 files changed, 1 insertion(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7646af756..1b5f72c2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,7 +219,7 @@ if( MSVC ) set( DEB_C_FLAGS "/D _CRTDBG_MAP_ALLOC /MTd" ) # Disable warnings for unsecure CRT functions from VC8+ - set( ALL_C_FLAGS "${ALL_C_FLAGS} /wd4996 /DUNICODE /D_UNICODE" ) + set( ALL_C_FLAGS "${ALL_C_FLAGS} /wd4996 /DUNICODE /D_UNICODE /D_WIN32_WINNT=0x0600" ) # The CMake configurations set /GR and /MD by default, which conflict with our settings. string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} ) diff --git a/src/d_anonstats.cpp b/src/d_anonstats.cpp index 7378fc17a..4b0319149 100644 --- a/src/d_anonstats.cpp +++ b/src/d_anonstats.cpp @@ -12,7 +12,6 @@ void D_ConfirmSendStats() #else // !NO_SEND_STATS #if defined(_WIN32) -#define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN #include #include diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp index 2674d553a..98af9957c 100644 --- a/src/win32/hardware.cpp +++ b/src/win32/hardware.cpp @@ -32,7 +32,6 @@ ** */ -#define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN #include #include diff --git a/src/win32/helperthread.cpp b/src/win32/helperthread.cpp index f6f74554f..f5874b99e 100644 --- a/src/win32/helperthread.cpp +++ b/src/win32/helperthread.cpp @@ -35,7 +35,6 @@ ** */ -#define _WIN32_WINNT 0x0400 #include "helperthread.h" //========================================================================== diff --git a/src/win32/i_cd.cpp b/src/win32/i_cd.cpp index cd00fbcfc..4e1c633b3 100644 --- a/src/win32/i_cd.cpp +++ b/src/win32/i_cd.cpp @@ -32,7 +32,6 @@ ** */ -#define _WIN32_WINNT 0x0400 #define WIN32_LEAN_AND_MEAN #include #include diff --git a/src/win32/i_crash.cpp b/src/win32/i_crash.cpp index 52daf378d..1a2df352a 100644 --- a/src/win32/i_crash.cpp +++ b/src/win32/i_crash.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include #include diff --git a/src/win32/i_dijoy.cpp b/src/win32/i_dijoy.cpp index 471152fe8..a47b28f9d 100644 --- a/src/win32/i_dijoy.cpp +++ b/src/win32/i_dijoy.cpp @@ -35,7 +35,6 @@ #define WIN32_LEAN_AND_MEAN #define DIRECTINPUT_VERSION 0x800 -#define _WIN32_WINNT 0x0501 #include #include #ifndef __GNUC__ diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index cbfa2864b..fb6239869 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -35,11 +35,6 @@ // DI3 only supports up to 4 mouse buttons, and I want the joystick to // be read using DirectInput instead of winmm. -#define DIRECTINPUT_VERSION 0x800 -#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501) -#define _WIN32_WINNT 0x0501 // Support the mouse wheel and session notification. -#endif - #define WIN32_LEAN_AND_MEAN #define __BYTEBOOL__ #ifndef __GNUC__ diff --git a/src/win32/i_keyboard.cpp b/src/win32/i_keyboard.cpp index 69571cbfd..7ab02ada0 100644 --- a/src/win32/i_keyboard.cpp +++ b/src/win32/i_keyboard.cpp @@ -35,7 +35,6 @@ #define WIN32_LEAN_AND_MEAN #define DIRECTINPUT_VERSION 0x800 -#define _WIN32_WINNT 0x0501 #include #include diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index de4b5e2c9..6d9c9f771 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include #include diff --git a/src/win32/i_mouse.cpp b/src/win32/i_mouse.cpp index 9915479b7..e786a11c7 100644 --- a/src/win32/i_mouse.cpp +++ b/src/win32/i_mouse.cpp @@ -35,7 +35,6 @@ #define WIN32_LEAN_AND_MEAN #define DIRECTINPUT_VERSION 0x800 -#define _WIN32_WINNT 0x0501 #include #include diff --git a/src/win32/i_rawps2.cpp b/src/win32/i_rawps2.cpp index 2fdfe4c21..a4214e479 100644 --- a/src/win32/i_rawps2.cpp +++ b/src/win32/i_rawps2.cpp @@ -34,7 +34,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include "i_input.h" diff --git a/src/win32/i_specialpaths.cpp b/src/win32/i_specialpaths.cpp index c354fe965..d109d077c 100644 --- a/src/win32/i_specialpaths.cpp +++ b/src/win32/i_specialpaths.cpp @@ -33,7 +33,6 @@ ** */ -#define _WIN32_WINNT 0x0600 #include #include #include diff --git a/src/win32/i_xinput.cpp b/src/win32/i_xinput.cpp index 50108991a..710d2f295 100644 --- a/src/win32/i_xinput.cpp +++ b/src/win32/i_xinput.cpp @@ -36,7 +36,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include #include diff --git a/src/win32/st_start.cpp b/src/win32/st_start.cpp index dc6b0694d..8acb6ddbb 100644 --- a/src/win32/st_start.cpp +++ b/src/win32/st_start.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 // required to get the MARQUEE defines #include #include #include "resource.h"