From 87f7672dbf1d771605973c2a5024920c7a6cf2c6 Mon Sep 17 00:00:00 2001 From: TellowKrinkle <tellowkrinkle@gmail.com> Date: Thu, 2 Sep 2021 18:36:37 -0500 Subject: [PATCH] GS: Remove windows includes from GS.h --- pcsx2/GS/GS.h | 12 ------------ pcsx2/GS/GSUtil.h | 4 ++++ pcsx2/GS/Renderers/DX11/GSDevice11.cpp | 1 + pcsx2/GS/Renderers/DX11/GSDevice11.h | 1 + pcsx2/GS/Renderers/DX11/GSTexture11.h | 1 + pcsx2/GS/Window/GSCaptureDlg.cpp | 1 + pcsx2/GS/Window/GSDialog.cpp | 1 + 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pcsx2/GS/GS.h b/pcsx2/GS/GS.h index b2bff8bc0e..062995d3d5 100644 --- a/pcsx2/GS/GS.h +++ b/pcsx2/GS/GS.h @@ -20,18 +20,6 @@ #include "SaveState.h" #include "Host.h" -#ifdef _WIN32 - -#include <windows.h> -#include <commctrl.h> -#include <commdlg.h> -#include <shellapi.h> -#include <d3dcompiler.h> -#include <d3d11_1.h> -#include <dxgi1_3.h> - -#endif - #include <map> #ifdef None diff --git a/pcsx2/GS/GSUtil.h b/pcsx2/GS/GSUtil.h index 3692f0b23c..680f669ef1 100644 --- a/pcsx2/GS/GSUtil.h +++ b/pcsx2/GS/GSUtil.h @@ -17,6 +17,10 @@ #include "GS.h" #include "GSRegs.h" +#ifdef _WIN32 +#include <d3dcommon.h> +#include <dxgi.h> +#endif #include <xbyak/xbyak_util.h> diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp index 3b5997ee79..f26e67e939 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp @@ -23,6 +23,7 @@ #include <fstream> #include <sstream> #include <VersionHelpers.h> +#include <d3dcompiler.h> GSDevice11::GSDevice11() { diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.h b/pcsx2/GS/Renderers/DX11/GSDevice11.h index e74197c9cb..7f433fae9e 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.h +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.h @@ -20,6 +20,7 @@ #include "GS/Renderers/Common/GSDevice.h" #include <unordered_map> #include <wil/com.h> +#include <dxgi1_3.h> struct GSVertexShader11 { diff --git a/pcsx2/GS/Renderers/DX11/GSTexture11.h b/pcsx2/GS/Renderers/DX11/GSTexture11.h index 1f470a35f8..82f5400edb 100644 --- a/pcsx2/GS/Renderers/DX11/GSTexture11.h +++ b/pcsx2/GS/Renderers/DX11/GSTexture11.h @@ -18,6 +18,7 @@ #include "GS.h" #include "GS/Renderers/Common/GSTexture.h" #include <wil/com.h> +#include <d3d11.h> class GSTexture11 : public GSTexture { diff --git a/pcsx2/GS/Window/GSCaptureDlg.cpp b/pcsx2/GS/Window/GSCaptureDlg.cpp index 034d4a2187..d4b3f07c79 100644 --- a/pcsx2/GS/Window/GSCaptureDlg.cpp +++ b/pcsx2/GS/Window/GSCaptureDlg.cpp @@ -17,6 +17,7 @@ #include "GS.h" #include "GSCaptureDlg.h" #include "GS/GSExtra.h" +#include <commdlg.h> // Ideally this belongs in WIL, but CAUUID is used by a *single* COM function in WinAPI. // That's presumably why it's omitted and is unlikely to make it to upstream WIL. diff --git a/pcsx2/GS/Window/GSDialog.cpp b/pcsx2/GS/Window/GSDialog.cpp index a715878fdb..acb8359e48 100644 --- a/pcsx2/GS/Window/GSDialog.cpp +++ b/pcsx2/GS/Window/GSDialog.cpp @@ -16,6 +16,7 @@ #include "PrecompiledHeader.h" #include <Shlwapi.h> #include <CommCtrl.h> +#include <commdlg.h> #include "GS.h" #include "GSDialog.h" #include "GS/GSVector.h"