From 652c01e25cbb49c35f0b3ac88b34828a1129aec2 Mon Sep 17 00:00:00 2001 From: Racc <36515039+Racc-Boi@users.noreply.github.com> Date: Mon, 16 Mar 2026 12:24:35 +0000 Subject: [PATCH] Stop including multiple windows headers when we use pch --- Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp | 2 -- Minecraft.Client/Durango/Iggy/gdraw/gdraw_d3d11.cpp | 5 ----- Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d11.cpp | 5 ----- Minecraft.Client/Windows64/KeyboardMouseInput.h | 2 -- Minecraft.Client/stdafx.h | 2 ++ Minecraft.World/stdafx.h | 2 ++ include/lce_filesystem/lce_filesystem.cpp | 4 ---- 7 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp index ef72ec163..021855b5e 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp @@ -18,8 +18,6 @@ #endif #ifdef _WINDOWS64 - -#include #include "Xbox\Resource.h" #endif diff --git a/Minecraft.Client/Durango/Iggy/gdraw/gdraw_d3d11.cpp b/Minecraft.Client/Durango/Iggy/gdraw/gdraw_d3d11.cpp index b5bfe1f69..db9c89939 100644 --- a/Minecraft.Client/Durango/Iggy/gdraw/gdraw_d3d11.cpp +++ b/Minecraft.Client/Durango/Iggy/gdraw/gdraw_d3d11.cpp @@ -26,15 +26,10 @@ #define GDRAW_ASSERTS -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - // We temporarily disable this warning for the shared interface portions #pragma warning (push) #pragma warning (disable: 4201) // nonstandard extension used : nameless struct/union -#include #include // 4J changed to use monolithic version #include "gdraw.h" #include "iggy.h" diff --git a/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d11.cpp b/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d11.cpp index b9fb627bf..1b51ef714 100644 --- a/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d11.cpp +++ b/Minecraft.Client/Windows64/Iggy/gdraw/gdraw_d3d11.cpp @@ -26,15 +26,10 @@ #define GDRAW_ASSERTS -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif - // We temporarily disable this warning for the shared interface portions #pragma warning (push) #pragma warning (disable: 4201) // nonstandard extension used : nameless struct/union -#include #include #include "gdraw.h" #include "iggy.h" diff --git a/Minecraft.Client/Windows64/KeyboardMouseInput.h b/Minecraft.Client/Windows64/KeyboardMouseInput.h index 0f14dfa1f..e90a9f2cf 100644 --- a/Minecraft.Client/Windows64/KeyboardMouseInput.h +++ b/Minecraft.Client/Windows64/KeyboardMouseInput.h @@ -2,8 +2,6 @@ #ifdef _WINDOWS64 -#include - class KeyboardMouseInput { public: diff --git a/Minecraft.Client/stdafx.h b/Minecraft.Client/stdafx.h index 30e8c7f9d..b74b6980b 100644 --- a/Minecraft.Client/stdafx.h +++ b/Minecraft.Client/stdafx.h @@ -23,6 +23,7 @@ #ifdef _WINDOWS64 #define _HAS_STD_BYTE 0 // solve (std::)'byte' ambiguity with windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define NOMINMAX // Exclude min/max macros from Windows headers // Windows Header Files: #include #include @@ -139,6 +140,7 @@ typedef XUID GameSessionUID; #include #include #include +#include #include diff --git a/Minecraft.World/stdafx.h b/Minecraft.World/stdafx.h index 37ec371f5..dfde5a26e 100644 --- a/Minecraft.World/stdafx.h +++ b/Minecraft.World/stdafx.h @@ -7,6 +7,7 @@ #ifdef _WINDOWS64 #define _HAS_STD_BYTE 0 // solve (std::)'byte' ambiguity with windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define NOMINMAX // Exclude min/max macros from Windows headers // Windows Header Files: #include #include @@ -105,6 +106,7 @@ typedef XUID GameSessionUID; #include #include #include +#include #ifndef __PS3__ // the PS3 lib assert is rubbish, and aborts the code, we define our own in PS3Types.h #include diff --git a/include/lce_filesystem/lce_filesystem.cpp b/include/lce_filesystem/lce_filesystem.cpp index e4dac0a07..0ee17fba3 100644 --- a/include/lce_filesystem/lce_filesystem.cpp +++ b/include/lce_filesystem/lce_filesystem.cpp @@ -1,10 +1,6 @@ #include "stdafx.h" #include "lce_filesystem.h" -#ifdef _WINDOWS64 -#include -#endif // TODO: More os' filesystem handling for when the project moves away from only Windows - #include bool FileOrDirectoryExists(const char* path)