VERY experimental Nintendo Switch 2 emulator
C++
Remove special rules for Windows.h and library includes
Yuri Kunde Schlesner32bddfa1f571
diff --git a/src/.clang-format b/src/.clang-formatindex e4f5d6d7ed..1c6b71b2e3 100644--- a/src/.clang-format+++ b/src/.clang-format@@ -46,14 +46,10 @@ DerivePointerAlignment: falseDisableFormat: falseForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]IncludeCategories:- - Regex: '^\<[wW]indows.h\>'- Priority: -3- - Regex: '^\<(boost|catch|dynarmic|glad|inih|nihstro)/'- Priority: -1- - Regex: '^\<(SDL|SoundTouch|Q)'- Priority: -1- - Regex: '^\<'+ - Regex: '^\<[^Q][^/.>]*\>'Priority: -2+ - Regex: '^\<'+ Priority: -1- Regex: '^\"'Priority: 0IndentCaseLabels: falsediff --git a/src/common/file_util.cpp b/src/common/file_util.cppindex 7a21962cc8..14cbcac6bb 100644--- a/src/common/file_util.cpp+++ b/src/common/file_util.cpp@@ -10,6 +10,7 @@#ifdef _WIN32#include <windows.h>+// windows.h needs to be included before other windows headers#include <commdlg.h> // for GetSaveFileName#include <direct.h> // getcwd#include <io.h>diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cppindex e19d7202a5..c19729b21f 100644--- a/src/common/memory_util.cpp+++ b/src/common/memory_util.cpp@@ -7,6 +7,7 @@#ifdef _WIN32#include <windows.h>+// Windows.h needs to be included before psapi.h#include <psapi.h>#include "common/common_funcs.h"#include "common/string_util.h"diff --git a/src/common/string_util.cpp b/src/common/string_util.cppindex ca97e8ab49..596ae01bf1 100644--- a/src/common/string_util.cpp+++ b/src/common/string_util.cpp@@ -12,8 +12,8 @@#include "common/logging/log.h"#include "common/string_util.h"#ifdef _MSC_VER-#include <Windows.h>#include <codecvt>+#include <Windows.h>#include "common/common_funcs.h"#else#include <iconv.h>diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cppindex 6d709bd15b..7fc72d801b 100644--- a/src/core/gdbstub/gdbstub.cpp+++ b/src/core/gdbstub/gdbstub.cpp@@ -10,9 +10,9 @@#include <cstdarg>#include <cstdio>#include <cstring>-#include <fcntl.h>#include <map>#include <numeric>+#include <fcntl.h>#ifdef _MSC_VER#include <WinSock2.h>diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cppindex 4d788755b3..211c703ab8 100644--- a/src/video_core/shader/shader_jit_x64.cpp+++ b/src/video_core/shader/shader_jit_x64.cpp@@ -5,8 +5,8 @@#include <algorithm>#include <cmath>#include <cstdint>-#include <xmmintrin.h>#include <nihstro/shader_bytecode.h>+#include <xmmintrin.h>#include "common/assert.h"#include "common/logging/log.h"#include "common/vector_math.h"