summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-10-05 12:03:05 +0200
committerGitHub <noreply@github.com>2021-10-05 12:03:05 +0200
commitb1c6826b9f84ad564c41a6d1b1e76b09354b8945 (patch)
treeb6cfb04ebd6631e3735b15dee2b130b637676fbd /platform/windows
parentc773c709c0b69336d5ae922cd7215f3ea1414be9 (diff)
parent425ed0ffe0880f2c63344c0861ddf37b346b9738 (diff)
Merge pull request #52963 from Pineapple/WIN32_LEAN_AND_MEAN_master
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/context_gl_windows.h1
-rw-r--r--platform/windows/crash_handler_windows.h1
-rw-r--r--platform/windows/display_server_windows.h1
-rw-r--r--platform/windows/key_mapping_windows.h2
-rw-r--r--platform/windows/os_windows.cpp4
-rw-r--r--platform/windows/os_windows.h2
-rw-r--r--platform/windows/vulkan_context_win.h2
-rw-r--r--platform/windows/windows_terminal_logger.cpp1
8 files changed, 10 insertions, 4 deletions
diff --git a/platform/windows/context_gl_windows.h b/platform/windows/context_gl_windows.h
index c8e8a0891d..feff1d825b 100644
--- a/platform/windows/context_gl_windows.h
+++ b/platform/windows/context_gl_windows.h
@@ -38,6 +38,7 @@
#include "core/error/error_list.h"
#include "core/os/os.h"
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
typedef bool(APIENTRY *PFNWGLSWAPINTERVALEXTPROC)(int interval);
diff --git a/platform/windows/crash_handler_windows.h b/platform/windows/crash_handler_windows.h
index e1ec8e6787..5cdc6d3e05 100644
--- a/platform/windows/crash_handler_windows.h
+++ b/platform/windows/crash_handler_windows.h
@@ -31,6 +31,7 @@
#ifndef CRASH_HANDLER_WINDOWS_H
#define CRASH_HANDLER_WINDOWS_H
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// Crash handler exception only enabled with MSVC
diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h
index 8b82288a40..6a90b28579 100644
--- a/platform/windows/display_server_windows.h
+++ b/platform/windows/display_server_windows.h
@@ -63,6 +63,7 @@
#include <fcntl.h>
#include <io.h>
#include <stdio.h>
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
diff --git a/platform/windows/key_mapping_windows.h b/platform/windows/key_mapping_windows.h
index f260666a3e..d056e88f06 100644
--- a/platform/windows/key_mapping_windows.h
+++ b/platform/windows/key_mapping_windows.h
@@ -33,8 +33,8 @@
#include "core/os/keyboard.h"
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-
#include <winuser.h>
class KeyMappingWindows {
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 458970c90f..c03b600f2e 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -28,15 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-// Must include Winsock before windows.h (included by os_windows.h)
-#include "drivers/unix/net_socket_posix.h"
-
#include "os_windows.h"
#include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h"
#include "core/io/marshalls.h"
#include "core/version_generated.gen.h"
+#include "drivers/unix/net_socket_posix.h"
#include "drivers/windows/dir_access_windows.h"
#include "drivers/windows/file_access_windows.h"
#include "joypad_windows.h"
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index c4a2eda8f4..d24afa91eb 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -57,7 +57,9 @@
#include <fcntl.h>
#include <io.h>
+#include <shellapi.h>
#include <stdio.h>
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
diff --git a/platform/windows/vulkan_context_win.h b/platform/windows/vulkan_context_win.h
index 39dd2641fd..61e66b8ae0 100644
--- a/platform/windows/vulkan_context_win.h
+++ b/platform/windows/vulkan_context_win.h
@@ -32,6 +32,8 @@
#define VULKAN_DEVICE_WIN_H
#include "drivers/vulkan/vulkan_context.h"
+
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
class VulkanContextWindows : public VulkanContext {
diff --git a/platform/windows/windows_terminal_logger.cpp b/platform/windows/windows_terminal_logger.cpp
index 8cab7ca521..e54a61fdfd 100644
--- a/platform/windows/windows_terminal_logger.cpp
+++ b/platform/windows/windows_terminal_logger.cpp
@@ -33,6 +33,7 @@
#ifdef WINDOWS_ENABLED
#include <stdio.h>
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
void WindowsTerminalLogger::logv(const char *p_format, va_list p_list, bool p_err) {