Set Windows defines earlier

This avoids compile warnings on MinGW GCC (because standard C++
headers eventually import the Windows stuff)
This commit is contained in:
Echo J 2024-11-04 16:02:53 +02:00
parent 0bf574a5b8
commit d9e8480b6d
4 changed files with 10 additions and 9 deletions

View file

@ -1,11 +1,11 @@
#include "Common_ddraw.h"
#define WIN32_LEAN_AND_MEAN
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#define NOMINMAX
#include "Common_ddraw.h"
#include <windows.h>
#include <shlwapi.h>

View file

@ -1,11 +1,11 @@
#include "Desktop.h"
#define WIN32_LEAN_AND_MEAN
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#define NOMINMAX
#include "Desktop.h"
#include <windows.h>
std::pair<uint32_t, uint32_t> GetDesktopResolution()
@ -21,4 +21,4 @@ std::pair<uint32_t, uint32_t> GetDesktopResolution()
result.second = displaySettings.dmPelsHeight;
}
return result;
}
}

View file

@ -1,5 +1,3 @@
#include "FriendlyMonitorNames.h"
// This API is Win7 only, so make sure we use dynamic imports
#define WIN32_LEAN_AND_MEAN
@ -7,6 +5,8 @@
#define WINVER 0x0602
#define _WIN32_WINNT 0x0602
#include "FriendlyMonitorNames.h"
#include <windows.h>
#include <memory>

View file

@ -1,7 +1,8 @@
#include "ParseUtils.hpp"
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include "ParseUtils.hpp"
#include <windows.h>
static std::string WcharToUTF8(std::wstring_view str)