From 713ec5ffd526aa5c783e4c6a13bcc45c453e2c10 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sun, 22 Jan 2017 23:08:45 -0800 Subject: [PATCH] Add includes for building on Windows without PCH --- Source/Core/AudioCommon/XAudio2Stream.h | 2 ++ Source/Core/Common/Atomic_Win32.h | 3 +-- Source/Core/Common/FileUtil.cpp | 2 +- Source/Core/Common/GL/GLInterface/WGL.h | 1 + Source/Core/Common/Logging/ConsoleListenerWin.cpp | 2 +- Source/Core/Common/MemoryUtil.cpp | 2 +- Source/Core/Common/Misc.cpp | 4 ++++ Source/Core/Common/MsgHandler.cpp | 4 ++++ Source/Core/Common/Profiler.cpp | 1 + Source/Core/Common/SettingsHandler.cpp | 2 +- Source/Core/Common/Thread.cpp | 4 +++- Source/Core/Common/Timer.cpp | 2 +- Source/Core/Core/HW/WiimoteReal/IOWin.cpp | 2 +- Source/Core/Core/IOS/WFS/WFSI.h | 1 + Source/Core/InputCommon/ControllerInterface/XInput/XInput.h | 2 +- 15 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Source/Core/AudioCommon/XAudio2Stream.h b/Source/Core/AudioCommon/XAudio2Stream.h index eb45634154..7fcb8f7b00 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.h +++ b/Source/Core/AudioCommon/XAudio2Stream.h @@ -15,6 +15,8 @@ #ifdef _WIN32 +#include + struct StreamingVoiceContext; struct IXAudio2; struct IXAudio2MasteringVoice; diff --git a/Source/Core/Common/Atomic_Win32.h b/Source/Core/Common/Atomic_Win32.h index 1a6f160b86..1260cd72bb 100644 --- a/Source/Core/Common/Atomic_Win32.h +++ b/Source/Core/Common/Atomic_Win32.h @@ -8,8 +8,7 @@ #include -#include "Common/Common.h" -#include "Common/Intrinsics.h" +#include "Common/CommonTypes.h" // Atomic operations are performed in a single step by the CPU. It is // impossible for other threads to see the operation "half-done." diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 652a2e466c..f4f3986b76 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -20,12 +20,12 @@ #include "Common/Logging/Log.h" #ifdef _WIN32 +#include #include // for GetSaveFileName #include // getcwd #include #include // guid stuff #include -#include #else #include #include diff --git a/Source/Core/Common/GL/GLInterface/WGL.h b/Source/Core/Common/GL/GLInterface/WGL.h index 24e2b942ca..e6f0ff3c66 100644 --- a/Source/Core/Common/GL/GLInterface/WGL.h +++ b/Source/Core/Common/GL/GLInterface/WGL.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include "Common/GL/GLInterfaceBase.h" diff --git a/Source/Core/Common/Logging/ConsoleListenerWin.cpp b/Source/Core/Common/Logging/ConsoleListenerWin.cpp index 1a6bdf16e9..4dca963757 100644 --- a/Source/Core/Common/Logging/ConsoleListenerWin.cpp +++ b/Source/Core/Common/Logging/ConsoleListenerWin.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include +#include #include "Common/Logging/ConsoleListener.h" diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index 2b1ed11d18..5ce39e1052 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -13,8 +13,8 @@ #include "Common/MsgHandler.h" #ifdef _WIN32 -#include #include +#include #include "Common/StringUtil.h" #else #include diff --git a/Source/Core/Common/Misc.cpp b/Source/Core/Common/Misc.cpp index 870294092c..69ff018471 100644 --- a/Source/Core/Common/Misc.cpp +++ b/Source/Core/Common/Misc.cpp @@ -8,6 +8,10 @@ #include "Common/CommonFuncs.h" +#ifdef _WIN32 +#include +#endif + // Generic function to get last error message. // Call directly after the command or use the error num. // This function might change the error code. diff --git a/Source/Core/Common/MsgHandler.cpp b/Source/Core/Common/MsgHandler.cpp index caf8d99f15..77c5547996 100644 --- a/Source/Core/Common/MsgHandler.cpp +++ b/Source/Core/Common/MsgHandler.cpp @@ -12,6 +12,10 @@ #include "Common/MsgHandler.h" #include "Common/StringUtil.h" +#ifdef _WIN32 +#include +#endif + bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no, int Style); static MsgAlertHandler msg_handler = DefaultMsgHandler; static bool AlertEnabled = true; diff --git a/Source/Core/Common/Profiler.cpp b/Source/Core/Common/Profiler.cpp index 0c7807a532..fdc356a164 100644 --- a/Source/Core/Common/Profiler.cpp +++ b/Source/Core/Common/Profiler.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include #include #include #include diff --git a/Source/Core/Common/SettingsHandler.cpp b/Source/Core/Common/SettingsHandler.cpp index a87fc478f5..9b5d91e4f5 100644 --- a/Source/Core/Common/SettingsHandler.cpp +++ b/Source/Core/Common/SettingsHandler.cpp @@ -11,9 +11,9 @@ #include #ifdef _WIN32 +#include #include #include -#include #include "Common/CommonFuncs.h" // snprintf #endif diff --git a/Source/Core/Common/Thread.cpp b/Source/Core/Common/Thread.cpp index a03b9c2e57..909016e7ae 100644 --- a/Source/Core/Common/Thread.cpp +++ b/Source/Core/Common/Thread.cpp @@ -6,7 +6,9 @@ #include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" -#ifndef _WIN32 +#ifdef _WIN32 +#include +#else #include #endif diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp index 752664c1b6..081dd2008c 100644 --- a/Source/Core/Common/Timer.cpp +++ b/Source/Core/Common/Timer.cpp @@ -7,9 +7,9 @@ #include #ifdef _WIN32 +#include #include #include -#include #else #include #endif diff --git a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp index ab53232d5b..603eec42ed 100644 --- a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp +++ b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include @@ -15,6 +14,7 @@ // The following Windows headers must be included AFTER windows.h. #include #include +#include #include // initguid.h must be included before Devpkey.h #include diff --git a/Source/Core/Core/IOS/WFS/WFSI.h b/Source/Core/Core/IOS/WFS/WFSI.h index c4c644f7ea..0c1973184e 100644 --- a/Source/Core/Core/IOS/WFS/WFSI.h +++ b/Source/Core/Core/IOS/WFS/WFSI.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include diff --git a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h index 52530e9a00..f2a81e3840 100644 --- a/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h +++ b/Source/Core/InputCommon/ControllerInterface/XInput/XInput.h @@ -9,8 +9,8 @@ #pragma once -#include #include +#include #include "InputCommon/ControllerInterface/ControllerInterface.h"