From f3436146400a9b042d9108747a63291f14205bad Mon Sep 17 00:00:00 2001 From: Silent Date: Wed, 7 Jul 2021 21:13:11 +0200 Subject: [PATCH] Target Windows 8 via project settings It's needed for the next commit, as thanks to wxWidgets anything using the precompiled header would default to 0x0600 (Vista) instead of 0x0602 (Win8). Now-redundant WINNT definitions resulting in macro redefinition warnings have been removed. --- common/vsprops/BaseProperties.props | 2 +- pcsx2/CDVD/CDVDdiscReader.h | 1 - pcsx2/CMakeLists.txt | 2 ++ pcsx2/DEV9/DEV9.cpp | 2 -- pcsx2/DEV9/smap.cpp | 2 -- pcsx2/SPU2/Windows/SndOut_XAudio2.cpp | 2 -- pcsx2/SPU2/Windows/dsp.cpp | 1 - tests/ctest/GS/CMakeLists.txt | 7 +++++++ 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/common/vsprops/BaseProperties.props b/common/vsprops/BaseProperties.props index 15018e7840..e6dd744b79 100644 --- a/common/vsprops/BaseProperties.props +++ b/common/vsprops/BaseProperties.props @@ -11,7 +11,7 @@ true $(SolutionDir);$(SolutionDir)\3rdparty\wxWidgets3.0\include;%(AdditionalIncludeDirectories) - __WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + __WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WINVER=0x0603;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) 16Bytes true false diff --git a/pcsx2/CDVD/CDVDdiscReader.h b/pcsx2/CDVD/CDVDdiscReader.h index f80bda91cc..2bb3d9f9c5 100644 --- a/pcsx2/CDVD/CDVDdiscReader.h +++ b/pcsx2/CDVD/CDVDdiscReader.h @@ -19,7 +19,6 @@ #include "IopCommon.h" #if defined(_WIN32) -#define _WIN32_WINNT 0x0600 #define NOMINMAX #include #endif diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 8652ec4f6a..8331e36683 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -85,6 +85,8 @@ if(WIN32) ) target_compile_definitions(PCSX2 PRIVATE _M_SSE=0x401 # TODO: Multiple ISA + WINVER=0x0603 + _WIN32_WINNT=0x0603 WIN32_LEAN_AND_MEAN LZMA_API_STATIC BUILD_DX=1 diff --git a/pcsx2/DEV9/DEV9.cpp b/pcsx2/DEV9/DEV9.cpp index 604060274e..78c87ed174 100644 --- a/pcsx2/DEV9/DEV9.cpp +++ b/pcsx2/DEV9/DEV9.cpp @@ -14,8 +14,6 @@ */ #include "PrecompiledHeader.h" -#define WINVER 0x0600 -#define _WIN32_WINNT 0x0600 #ifdef _WIN32 //#include diff --git a/pcsx2/DEV9/smap.cpp b/pcsx2/DEV9/smap.cpp index e56a990154..4716d8cdb4 100644 --- a/pcsx2/DEV9/smap.cpp +++ b/pcsx2/DEV9/smap.cpp @@ -15,8 +15,6 @@ #include "PrecompiledHeader.h" -#define WINVER 0x0600 -#define _WIN32_WINNT 0x0600 #ifdef _WIN32 //#include #include diff --git a/pcsx2/SPU2/Windows/SndOut_XAudio2.cpp b/pcsx2/SPU2/Windows/SndOut_XAudio2.cpp index 2e676a30fe..d8aed555f3 100644 --- a/pcsx2/SPU2/Windows/SndOut_XAudio2.cpp +++ b/pcsx2/SPU2/Windows/SndOut_XAudio2.cpp @@ -17,8 +17,6 @@ #include "SPU2/Global.h" #include "Dialogs.h" -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0602 #include #include #include diff --git a/pcsx2/SPU2/Windows/dsp.cpp b/pcsx2/SPU2/Windows/dsp.cpp index c7c72c1891..7eec069b3d 100644 --- a/pcsx2/SPU2/Windows/dsp.cpp +++ b/pcsx2/SPU2/Windows/dsp.cpp @@ -16,7 +16,6 @@ #include "PrecompiledHeader.h" #include "SPU2/Global.h" -#define _WIN32_WINNT 0x0600 #include #include diff --git a/tests/ctest/GS/CMakeLists.txt b/tests/ctest/GS/CMakeLists.txt index 3f181c0c08..d1126e5b34 100644 --- a/tests/ctest/GS/CMakeLists.txt +++ b/tests/ctest/GS/CMakeLists.txt @@ -23,4 +23,11 @@ foreach(isa "sse4" "avx" "avx2") target_compile_options(swizzle_test_${isa} PRIVATE ${compile_options_${isa}}) target_compile_definitions(swizzle_test_${isa} PRIVATE ${definitions_${isa}}) + if(WIN32) + target_compile_definitions(swizzle_test_${isa} PRIVATE + WINVER=0x0603 + _WIN32_WINNT=0x0603 + WIN32_LEAN_AND_MEAN + ) + endif() endforeach()