From dc7d360dce5117ae35e01797082eb86420bf31d2 Mon Sep 17 00:00:00 2001 From: Craig Carnell <1188869+cscd98@users.noreply.github.com> Date: Sun, 28 Sep 2025 18:34:24 +0100 Subject: [PATCH 1/3] mingw: lower case windows includes --- Source/Core/AudioCommon/CubebStream.cpp | 2 +- Source/Core/AudioCommon/CubebUtils.cpp | 2 +- Source/Core/AudioCommon/WASAPIStream.cpp | 2 +- Source/Core/AudioCommon/WASAPIStream.h | 2 +- Source/Core/Common/Arm64Emitter.cpp | 2 +- Source/Core/Common/ArmCPUDetect.cpp | 2 +- Source/Core/Common/CommonFuncs.cpp | 2 +- Source/Core/Common/CompatPatches.cpp | 2 +- Source/Core/Common/DynamicLibrary.cpp | 2 +- Source/Core/Common/FileSearch.cpp | 4 ++-- Source/Core/Common/FileUtil.cpp | 4 ++-- Source/Core/Common/LdrWatcher.cpp | 4 ++-- Source/Core/Common/Network.cpp | 2 +- Source/Core/Common/QoSSession.cpp | 2 +- Source/Core/Common/Semaphore.h | 2 +- Source/Core/Common/SocketContext.h | 2 +- Source/Core/Common/StringUtil.cpp | 2 +- Source/Core/Common/Thread.cpp | 2 +- Source/Core/Common/Timer.cpp | 2 +- Source/Core/Common/WindowsDevice.cpp | 2 +- Source/Core/Common/WindowsDevice.h | 5 ++--- Source/Core/Common/WindowsRegistry.cpp | 2 +- Source/Core/Common/WindowsRegistry.h | 2 +- Source/Core/Core/Config/DefaultLocale.cpp | 2 +- Source/Core/Core/DolphinAnalytics.cpp | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp | 2 +- Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp | 2 +- Source/Core/Core/HW/EXI/BBA/BuiltIn.h | 2 +- Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h | 2 +- Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp | 2 +- Source/Core/Core/HW/WiimoteReal/IOWin.cpp | 10 +++++----- Source/Core/Core/IOS/FS/FileSystem.h | 2 +- Source/Core/Core/IOS/Network/ICMP.h | 2 +- Source/Core/Core/IOS/Network/Socket.h | 2 +- Source/Core/Core/IOS/USB/Emulated/Microphone.cpp | 2 +- Source/Core/Core/NetworkCaptureLogger.h | 2 +- Source/Core/Core/PowerPC/GDBStub.cpp | 2 +- Source/Core/DolphinNoGUI/MainNoGUI.cpp | 2 +- Source/Core/DolphinNoGUI/PlatformWin32.cpp | 2 +- Source/Core/DolphinQt/Main.cpp | 2 +- Source/Core/DolphinQt/RenderWidget.cpp | 2 +- .../ControllerInterface/DInput/XInputFilter.cpp | 4 ++-- .../ControllerInterface/DInput/XInputFilter.h | 2 +- .../ForceFeedback/ForceFeedbackDevice.h | 2 +- .../Core/InputCommon/ControllerInterface/SDL/SDL.cpp | 2 +- .../InputCommon/ControllerInterface/Win32/Win32.cpp | 2 +- .../InputCommon/ControllerInterface/XInput/XInput.h | 2 +- Source/Core/UICommon/AutoUpdate.cpp | 2 +- Source/Core/UpdaterCommon/UpdaterCommon.cpp | 2 +- Source/Core/WinUpdater/Main.cpp | 2 +- Source/Core/WinUpdater/Platform.cpp | 2 +- Source/Core/WinUpdater/WinUI.cpp | 8 ++++---- Source/PCH/pch.h | 2 +- 53 files changed, 65 insertions(+), 66 deletions(-) diff --git a/Source/Core/AudioCommon/CubebStream.cpp b/Source/Core/AudioCommon/CubebStream.cpp index dd6a35f13e..7f2c0936c3 100644 --- a/Source/Core/AudioCommon/CubebStream.cpp +++ b/Source/Core/AudioCommon/CubebStream.cpp @@ -11,7 +11,7 @@ #include "Core/Config/MainSettings.h" #ifdef _WIN32 -#include +#include #endif // ~10 ms - needs to be at least 240 for surround diff --git a/Source/Core/AudioCommon/CubebUtils.cpp b/Source/Core/AudioCommon/CubebUtils.cpp index 73bfafb7fd..89d5834fab 100644 --- a/Source/Core/AudioCommon/CubebUtils.cpp +++ b/Source/Core/AudioCommon/CubebUtils.cpp @@ -14,7 +14,7 @@ #include #ifdef _WIN32 -#include +#include #endif static void LogCallback(const char* format, ...) diff --git a/Source/Core/AudioCommon/WASAPIStream.cpp b/Source/Core/AudioCommon/WASAPIStream.cpp index 0eabb910cd..14a1cb3a18 100644 --- a/Source/Core/AudioCommon/WASAPIStream.cpp +++ b/Source/Core/AudioCommon/WASAPIStream.cpp @@ -7,7 +7,7 @@ // clang-format off #include -#include +#include #include #include #include diff --git a/Source/Core/AudioCommon/WASAPIStream.h b/Source/Core/AudioCommon/WASAPIStream.h index dfe0974a8c..ba058c78d3 100644 --- a/Source/Core/AudioCommon/WASAPIStream.h +++ b/Source/Core/AudioCommon/WASAPIStream.h @@ -6,7 +6,7 @@ #ifdef _WIN32 // clang-format off -#include +#include #include #include #include diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index cdb0b7e625..51c9823d17 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -21,7 +21,7 @@ #include "Common/SmallVector.h" #ifdef _WIN32 -#include +#include #endif #ifdef __APPLE__ #include diff --git a/Source/Core/Common/ArmCPUDetect.cpp b/Source/Core/Common/ArmCPUDetect.cpp index 68a29caa45..91b66f807f 100644 --- a/Source/Core/Common/ArmCPUDetect.cpp +++ b/Source/Core/Common/ArmCPUDetect.cpp @@ -12,7 +12,7 @@ #ifdef __APPLE__ #include #elif defined(_WIN32) -#include +#include #include #include "Common/WindowsRegistry.h" #elif defined(__linux__) diff --git a/Source/Core/Common/CommonFuncs.cpp b/Source/Core/Common/CommonFuncs.cpp index 2c70ced6ca..369d09066e 100644 --- a/Source/Core/Common/CommonFuncs.cpp +++ b/Source/Core/Common/CommonFuncs.cpp @@ -9,7 +9,7 @@ #ifdef _WIN32 #include -#include +#include #define strerror_r(err, buf, len) strerror_s(buf, len, err) diff --git a/Source/Core/Common/CompatPatches.cpp b/Source/Core/Common/CompatPatches.cpp index 8697357883..91394e96c0 100644 --- a/Source/Core/Common/CompatPatches.cpp +++ b/Source/Core/Common/CompatPatches.cpp @@ -1,7 +1,7 @@ // Copyright 2008 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include +#include #include #include #include diff --git a/Source/Core/Common/DynamicLibrary.cpp b/Source/Core/Common/DynamicLibrary.cpp index e9686859d3..ca6c17be6d 100644 --- a/Source/Core/Common/DynamicLibrary.cpp +++ b/Source/Core/Common/DynamicLibrary.cpp @@ -8,7 +8,7 @@ #include #ifdef _WIN32 -#include +#include #else #include #endif diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index ebaa9f37b0..c88c54195f 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -11,8 +11,8 @@ #include "Common/Logging/Log.h" #include "Common/StringUtil.h" -#ifdef _MSC_VER -#include +#ifdef _WIN32 +#include #elifdef ANDROID #include "jni/AndroidCommon/AndroidCommon.h" #endif diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 1dbbb4ac41..743604c167 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -29,13 +29,13 @@ #include "Common/StringUtil.h" #ifdef _WIN32 -#include -#include +#include #include // for GetSaveFileName #include // getcwd #include #include // guid stuff #include +#include #else #include #include diff --git a/Source/Core/Common/LdrWatcher.cpp b/Source/Core/Common/LdrWatcher.cpp index a0db0b61c6..31a8278bba 100644 --- a/Source/Core/Common/LdrWatcher.cpp +++ b/Source/Core/Common/LdrWatcher.cpp @@ -3,9 +3,9 @@ #include "Common/LdrWatcher.h" -#include -#include +#include #include +#include #include typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA diff --git a/Source/Core/Common/Network.cpp b/Source/Core/Common/Network.cpp index d44d106da5..c1c34b9a70 100644 --- a/Source/Core/Common/Network.cpp +++ b/Source/Core/Common/Network.cpp @@ -13,7 +13,7 @@ #include #include #else -#include +#include #endif #include diff --git a/Source/Core/Common/QoSSession.cpp b/Source/Core/Common/QoSSession.cpp index 2bcecea2bf..8c304bbeb5 100644 --- a/Source/Core/Common/QoSSession.cpp +++ b/Source/Core/Common/QoSSession.cpp @@ -4,7 +4,7 @@ #include "Common/QoSSession.h" #if defined(_WIN32) -#include +#include #pragma comment(lib, "qwave") #endif diff --git a/Source/Core/Common/Semaphore.h b/Source/Core/Common/Semaphore.h index cc87550148..1885e36883 100644 --- a/Source/Core/Common/Semaphore.h +++ b/Source/Core/Common/Semaphore.h @@ -5,7 +5,7 @@ #ifdef _WIN32 -#include +#include namespace Common { diff --git a/Source/Core/Common/SocketContext.h b/Source/Core/Common/SocketContext.h index 0aa4929e89..5dcf45df5d 100644 --- a/Source/Core/Common/SocketContext.h +++ b/Source/Core/Common/SocketContext.h @@ -4,8 +4,8 @@ #pragma once #ifdef _WIN32 -#include #include +#include #endif namespace Common diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 79dc2a4269..5cfe576bb3 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -26,7 +26,7 @@ #include "Common/Logging/Log.h" #ifdef _WIN32 -#include +#include #include constexpr u32 CODEPAGE_SHIFT_JIS = 932; constexpr u32 CODEPAGE_WINDOWS_1252 = 1252; diff --git a/Source/Core/Common/Thread.cpp b/Source/Core/Common/Thread.cpp index 258559bc4f..d9a40fc6b5 100644 --- a/Source/Core/Common/Thread.cpp +++ b/Source/Core/Common/Thread.cpp @@ -4,7 +4,7 @@ #include "Common/Thread.h" #ifdef _WIN32 -#include +#include #include #else #include diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp index 957073426b..fcbbd7bbd2 100644 --- a/Source/Core/Common/Timer.cpp +++ b/Source/Core/Common/Timer.cpp @@ -8,7 +8,7 @@ #include "Common/CommonFuncs.h" #ifdef _WIN32 -#include +#include #include #endif diff --git a/Source/Core/Common/WindowsDevice.cpp b/Source/Core/Common/WindowsDevice.cpp index 34a540ed7b..dc7d4ad68c 100644 --- a/Source/Core/Common/WindowsDevice.cpp +++ b/Source/Core/Common/WindowsDevice.cpp @@ -7,7 +7,7 @@ #include -#include "Hidclass.h" +#include "hidclass.h" #include "Common/CommonFuncs.h" #include "Common/Logging/Log.h" diff --git a/Source/Core/Common/WindowsDevice.h b/Source/Core/Common/WindowsDevice.h index 78e8234c15..8de1b6b01f 100644 --- a/Source/Core/Common/WindowsDevice.h +++ b/Source/Core/Common/WindowsDevice.h @@ -16,11 +16,10 @@ #ifndef NOMINMAX #define NOMINMAX #endif -#include - -#include +#include #include #include +#include #include "Common/Functional.h" diff --git a/Source/Core/Common/WindowsRegistry.cpp b/Source/Core/Common/WindowsRegistry.cpp index 6067420669..e95bd2da0c 100644 --- a/Source/Core/Common/WindowsRegistry.cpp +++ b/Source/Core/Common/WindowsRegistry.cpp @@ -1,6 +1,6 @@ #include "Common/WindowsRegistry.h" -#include +#include #include #include #include "Common/StringUtil.h" diff --git a/Source/Core/Common/WindowsRegistry.h b/Source/Core/Common/WindowsRegistry.h index 7dc3a52f91..affeba41cb 100644 --- a/Source/Core/Common/WindowsRegistry.h +++ b/Source/Core/Common/WindowsRegistry.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include "Common/CommonTypes.h" diff --git a/Source/Core/Core/Config/DefaultLocale.cpp b/Source/Core/Core/Config/DefaultLocale.cpp index 79c4c67787..55f304c88f 100644 --- a/Source/Core/Core/Config/DefaultLocale.cpp +++ b/Source/Core/Core/Config/DefaultLocale.cpp @@ -11,7 +11,7 @@ #include #ifdef _WIN32 -#include +#include #endif #include "Common/Assert.h" diff --git a/Source/Core/Core/DolphinAnalytics.cpp b/Source/Core/Core/DolphinAnalytics.cpp index 8b207c658c..29206f0d4e 100644 --- a/Source/Core/Core/DolphinAnalytics.cpp +++ b/Source/Core/Core/DolphinAnalytics.cpp @@ -13,7 +13,7 @@ #include #if defined(_WIN32) -#include +#include #include "Common/WindowsRegistry.h" #elif defined(__APPLE__) #include diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp index 61c55857b2..a2151f949b 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/ROM.cpp @@ -4,7 +4,7 @@ #include "Core/HW/DSPHLE/UCodes/ROM.h" #ifdef _WIN32 -#include +#include #endif #include "Common/ChunkFile.h" diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp index d6fd59b145..5bc1e2b1d0 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp @@ -7,7 +7,7 @@ #include #ifdef _WIN32 -#include +#include #endif #include "Common/ChunkFile.h" diff --git a/Source/Core/Core/HW/EXI/BBA/BuiltIn.h b/Source/Core/Core/HW/EXI/BBA/BuiltIn.h index 691431f1c8..d1f656de64 100644 --- a/Source/Core/Core/HW/EXI/BBA/BuiltIn.h +++ b/Source/Core/Core/HW/EXI/BBA/BuiltIn.h @@ -4,7 +4,7 @@ #pragma once #ifdef _WIN32 -#include +#include using socklen_t = int; #else #include diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h b/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h index 78b20f5a44..34d9ab49cc 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h +++ b/Source/Core/Core/HW/EXI/EXI_DeviceEthernet.h @@ -11,7 +11,7 @@ #include "SFML/Network/IpAddress.hpp" #ifdef _WIN32 -#include +#include #endif #include diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp index 2d3d66feab..714fdbf870 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp @@ -20,7 +20,7 @@ #include "Core/System.h" #ifdef _WIN32 -#include +#include #endif namespace ExpansionInterface diff --git a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp index 00bf2376a8..7ed204f2d6 100644 --- a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp +++ b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp @@ -9,11 +9,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include // initguid.h must be included before devpkey.h diff --git a/Source/Core/Core/IOS/FS/FileSystem.h b/Source/Core/Core/IOS/FS/FileSystem.h index 94b943d92a..3e85b4b6f0 100644 --- a/Source/Core/Core/IOS/FS/FileSystem.h +++ b/Source/Core/Core/IOS/FS/FileSystem.h @@ -12,7 +12,7 @@ #ifdef _WIN32 // TODO: Horrible hack, remove ASAP! -#include +#include #endif #include "Common/CommonTypes.h" diff --git a/Source/Core/Core/IOS/Network/ICMP.h b/Source/Core/Core/IOS/Network/ICMP.h index 258a9b6c3f..64131f02d3 100644 --- a/Source/Core/Core/IOS/Network/ICMP.h +++ b/Source/Core/Core/IOS/Network/ICMP.h @@ -4,7 +4,7 @@ #pragma once #ifdef _WIN32 -#include +#include #else #include #endif diff --git a/Source/Core/Core/IOS/Network/Socket.h b/Source/Core/Core/IOS/Network/Socket.h index a529f28e14..c3093a6202 100644 --- a/Source/Core/Core/IOS/Network/Socket.h +++ b/Source/Core/Core/IOS/Network/Socket.h @@ -4,8 +4,8 @@ #pragma once #ifdef _WIN32 -#include #include +#include #include typedef pollfd pollfd_t; diff --git a/Source/Core/Core/IOS/USB/Emulated/Microphone.cpp b/Source/Core/Core/IOS/USB/Emulated/Microphone.cpp index a80c0e0cfe..7fd2e2d9dc 100644 --- a/Source/Core/Core/IOS/USB/Emulated/Microphone.cpp +++ b/Source/Core/Core/IOS/USB/Emulated/Microphone.cpp @@ -21,7 +21,7 @@ #include "Core/System.h" #ifdef _WIN32 -#include +#include #endif #ifdef ANDROID diff --git a/Source/Core/Core/NetworkCaptureLogger.h b/Source/Core/Core/NetworkCaptureLogger.h index 27489ec089..1324171eef 100644 --- a/Source/Core/Core/NetworkCaptureLogger.h +++ b/Source/Core/Core/NetworkCaptureLogger.h @@ -9,7 +9,7 @@ #include #ifdef _WIN32 -#include +#include using socklen_t = int; #else #include diff --git a/Source/Core/Core/PowerPC/GDBStub.cpp b/Source/Core/Core/PowerPC/GDBStub.cpp index 088a74c926..f8e6c51a14 100644 --- a/Source/Core/Core/PowerPC/GDBStub.cpp +++ b/Source/Core/Core/PowerPC/GDBStub.cpp @@ -9,8 +9,8 @@ #include #include #ifdef _WIN32 -#include #include +#include #include typedef SSIZE_T ssize_t; #define SHUT_RDWR SD_BOTH diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index 1e1ff6e39f..3bf40ea0d4 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -12,7 +12,7 @@ #ifndef _WIN32 #include #else -#include +#include #endif #include "Common/ScopeGuard.h" diff --git a/Source/Core/DolphinNoGUI/PlatformWin32.cpp b/Source/Core/DolphinNoGUI/PlatformWin32.cpp index 7304332682..31b4bf7327 100644 --- a/Source/Core/DolphinNoGUI/PlatformWin32.cpp +++ b/Source/Core/DolphinNoGUI/PlatformWin32.cpp @@ -8,7 +8,7 @@ #include "Core/Core.h" #include "Core/System.h" -#include +#include #include #include diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index b223819e7a..6ebff53462 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #endif #ifdef __linux__ diff --git a/Source/Core/DolphinQt/RenderWidget.cpp b/Source/Core/DolphinQt/RenderWidget.cpp index 9b5026d5fb..49680b8482 100644 --- a/Source/Core/DolphinQt/RenderWidget.cpp +++ b/Source/Core/DolphinQt/RenderWidget.cpp @@ -32,7 +32,7 @@ #include "VideoCommon/Present.h" #ifdef _WIN32 -#include +#include #include #endif diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp index 4379749e5f..3d3d8049c0 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include namespace ciface::DInput { diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h index de3d684372..52911dabaa 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h @@ -3,7 +3,7 @@ #pragma once -#include +#include #include namespace ciface::DInput diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h index 6a00d2812a..dabc1d5c63 100644 --- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h +++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h @@ -7,7 +7,7 @@ #include #include -#include +#include #include "Common/Event.h" #include "Common/Flag.h" diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp index f6912f67ce..5aeb9e07db 100644 --- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp @@ -8,7 +8,7 @@ #include #ifdef _WIN32 -#include +#include #endif #include diff --git a/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp b/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp index 79584913cf..eb4bd6fd6b 100644 --- a/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Win32/Win32.cpp @@ -3,7 +3,7 @@ #include "InputCommon/ControllerInterface/Win32/Win32.h" -#include +#include #include // must be before hidclass #include diff --git a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h index 95fe6a3c6f..b006d1c7cc 100644 --- a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h +++ b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include #include "InputCommon/ControllerInterface/ControllerInterface.h" diff --git a/Source/Core/UICommon/AutoUpdate.cpp b/Source/Core/UICommon/AutoUpdate.cpp index 668a991545..21a5341fd5 100644 --- a/Source/Core/UICommon/AutoUpdate.cpp +++ b/Source/Core/UICommon/AutoUpdate.cpp @@ -16,7 +16,7 @@ #include "Common/Version.h" #ifdef _WIN32 -#include +#include #else #include #endif diff --git a/Source/Core/UpdaterCommon/UpdaterCommon.cpp b/Source/Core/UpdaterCommon/UpdaterCommon.cpp index 56f9c7f7e8..4f91dc1acd 100644 --- a/Source/Core/UpdaterCommon/UpdaterCommon.cpp +++ b/Source/Core/UpdaterCommon/UpdaterCommon.cpp @@ -30,7 +30,7 @@ #endif #ifdef _WIN32 -#include +#include #include #endif diff --git a/Source/Core/WinUpdater/Main.cpp b/Source/Core/WinUpdater/Main.cpp index a87a9c02fe..24eaeaf263 100644 --- a/Source/Core/WinUpdater/Main.cpp +++ b/Source/Core/WinUpdater/Main.cpp @@ -2,8 +2,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include -#include #include +#include #include #include diff --git a/Source/Core/WinUpdater/Platform.cpp b/Source/Core/WinUpdater/Platform.cpp index c48271be55..8e6d0eaf6f 100644 --- a/Source/Core/WinUpdater/Platform.cpp +++ b/Source/Core/WinUpdater/Platform.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/Source/Core/WinUpdater/WinUI.cpp b/Source/Core/WinUpdater/WinUI.cpp index c6e65626e9..0a92172911 100644 --- a/Source/Core/WinUpdater/WinUI.cpp +++ b/Source/Core/WinUpdater/WinUI.cpp @@ -7,11 +7,11 @@ #include #include -#include -#include -#include -#include +#include +#include #include +#include +#include #include #include "Common/Event.h" diff --git a/Source/PCH/pch.h b/Source/PCH/pch.h index 484f2d343b..e132288548 100644 --- a/Source/PCH/pch.h +++ b/Source/PCH/pch.h @@ -94,7 +94,7 @@ #include #ifdef _WIN32 -#include +#include #endif #include "Common/Common.h" From 0eec382e1eff3fb45e42296f040e3cda3578d657 Mon Sep 17 00:00:00 2001 From: Craig Carnell <1188869+cscd98@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:53:18 +0000 Subject: [PATCH 2/3] Update Contributing.md with lowercase header requirement --- Contributing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Contributing.md b/Contributing.md index 474b5deb76..77e1abf15e 100644 --- a/Contributing.md +++ b/Contributing.md @@ -200,6 +200,8 @@ Summary: - The preferred form of the increment and decrement operator in for-loops is prefix-form (e.g. `++var`). ## Headers +- When including Windows‑specific headers (e.g., windows.h, winnt.h, shlwapi.h), the #include directive must be lower case as some cross-compilers (e.g. MingW) may be used on case-sensitive filesystems such as Linux, where the files are typically lower case. + - `#include ` - If a header is not necessary in a certain source file, remove them. - If you find duplicate includes of a certain header, remove it. - When declaring includes in a source file, make sure they follow the given pattern: From d702ef984a799ff822f9f2dcef71a6fbcdb8c59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Sun, 22 Feb 2026 20:40:41 +0100 Subject: [PATCH 3/3] lint: Check for Windows headers' casing --- Tools/lint.sh | 32 + Tools/windows-headers.txt | 1405 +++++++++++++++++++++++++++++++++++++ 2 files changed, 1437 insertions(+) create mode 100644 Tools/windows-headers.txt diff --git a/Tools/lint.sh b/Tools/lint.sh index 69cb5b27bb..7ffaabbfde 100755 --- a/Tools/lint.sh +++ b/Tools/lint.sh @@ -63,6 +63,35 @@ if [ $FORCE -eq 0 ]; then fi fi +SCRIPT_DIR=$(dirname "$0") + +# Generated from "ls *.h -1 > windows-headers.txt" inside mingw-w64/mingw-w64-headers/include. +# Get the source here: https://www.mingw-w64.org/source/ +WINDOWS_HEADERS_FILE="${SCRIPT_DIR}/windows-headers.txt" +if [[ ! -f "$WINDOWS_HEADERS_FILE" ]]; then + echo >&2 "error: missing windows-headers.txt" + exit 1 +fi + +declare -A WINDOWS_HEADERS_MAP +mapfile -t headers < "$WINDOWS_HEADERS_FILE" +for header in "${headers[@]}"; do + [[ -z "$header" || "$header" =~ ^# ]] && continue + WINDOWS_HEADERS_MAP["${header,,}"]=1 +done + +function windows_include_check() { + local file="$1" + while read -r header; do + local lower="${header,,}" + if [[ -n "${WINDOWS_HEADERS_MAP[${lower}]:-}" ]] && [[ "$header" != "${lower}" ]]; then + echo "!!! ${file} not compliant to coding style:" + echo "Windows system includes must be lowercase: ${header}" + fail=1 + fi + done < <(awk -F'[<>]' '/#include