diff --git a/Common/CommonWindows.h b/Common/CommonWindows.h index 28e8bc0a1d..5baef6ea01 100644 --- a/Common/CommonWindows.h +++ b/Common/CommonWindows.h @@ -1,5 +1,7 @@ #pragma once +#ifdef _WIN32 + #if defined(_MSC_VER) && _MSC_VER < 1700 #error You need a newer version of Visual Studio #else @@ -12,7 +14,6 @@ #undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1 -#ifdef _WIN32 #pragma warning(disable:4091) #ifndef WIN32_LEAN_AND_MEAN diff --git a/Common/File/VFS/SevenZipFileReader.h b/Common/File/VFS/SevenZipFileReader.h index d4b8ad6636..5411587e73 100644 --- a/Common/File/VFS/SevenZipFileReader.h +++ b/Common/File/VFS/SevenZipFileReader.h @@ -7,6 +7,8 @@ #include #include +#include "Common/CommonWindows.h" + #include "ext/lzma-sdk/7z.h" #include "ext/lzma-sdk/7zFile.h" diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index 46670434d1..2024ecb1d9 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -25,7 +25,6 @@ #include "Core/MIPS/JitCommon/JitBlockCache.h" #include "Core/MIPS/JitCommon/JitCommon.h" #include "Core/MIPS/IR/IRRegCache.h" -#include "Core/MIPS/IR/IRInst.h" #include "Core/MIPS/IR/IRFrontend.h" #include "Core/MIPS/MIPSVFPUUtils.h" @@ -43,6 +42,8 @@ #error #endif +struct IRInst; + namespace MIPSComp { // TODO : Use arena allocators. For now let's just malloc. diff --git a/Core/MIPS/IR/IRNativeCommon.h b/Core/MIPS/IR/IRNativeCommon.h index 138020c39d..f5ce920521 100644 --- a/Core/MIPS/IR/IRNativeCommon.h +++ b/Core/MIPS/IR/IRNativeCommon.h @@ -18,6 +18,7 @@ #pragma once #include + #include "Core/MIPS/IR/IRJit.h" #include "Core/MIPS/JitCommon/JitBlockCache.h" diff --git a/Core/MIPS/IR/IRRegCache.h b/Core/MIPS/IR/IRRegCache.h index addd31d233..c4d8688388 100644 --- a/Core/MIPS/IR/IRRegCache.h +++ b/Core/MIPS/IR/IRRegCache.h @@ -23,7 +23,6 @@ #include "Common/CommonTypes.h" #include "Core/MIPS/MIPS.h" #include "Core/MIPS/IR/IRAnalysis.h" -#include "Core/MIPS/IR/IRInst.h" // Have to account for all of them due to temps, etc. @@ -91,6 +90,8 @@ static inline MIPSMap operator &(const MIPSMap &lhs, const MIPSMap &rhs) { return MIPSMap((uint8_t)lhs & (uint8_t)rhs); } +struct IRInst; + class IRNativeRegCacheBase { protected: enum class MIPSLoc { diff --git a/UI/EmuScreen.h b/UI/EmuScreen.h index fd59a9b35c..8c7fc8875d 100644 --- a/UI/EmuScreen.h +++ b/UI/EmuScreen.h @@ -28,13 +28,15 @@ #include "Common/UI/Tween.h" #include "Core/KeyMap.h" #include "Core/ControlMapper.h" - -#include "UI/ImDebugger/ImDebugger.h" +#include "UI/ImDebugger/ImCommand.h" struct AxisInput; class AsyncImageFileView; class ChatMenu; +class ImDebugger; +struct ImCommand; +struct ImGuiContext; class EmuScreen : public UIScreen, protected ControlListener { public: diff --git a/UI/ImDebugger/ImCommand.h b/UI/ImDebugger/ImCommand.h new file mode 100644 index 0000000000..978a4eb881 --- /dev/null +++ b/UI/ImDebugger/ImCommand.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +enum class ImCmd { + NONE = 0, + TRIGGER_FIND_POPUP, + SHOW_IN_CPU_DISASM, + SHOW_IN_GE_DISASM, + SHOW_IN_MEMORY_VIEWER, // param is address, param2 is viewer index + SHOW_IN_PIXEL_VIEWER, // param is address, param2 is stride, |0x80000000 if depth, param3 is w/h + SHOW_IN_MEMORY_DUMPER, // param is address, param2 is size, param3 is mode +}; + +struct ImCommand { + ImCmd cmd; + uint32_t param; + uint32_t param2; + uint32_t param3; +}; + +struct ImControl { + ImCommand command; +}; diff --git a/UI/ImDebugger/ImDebugger.h b/UI/ImDebugger/ImDebugger.h index f7c14d5125..63ac0efac5 100644 --- a/UI/ImDebugger/ImDebugger.h +++ b/UI/ImDebugger/ImDebugger.h @@ -23,6 +23,7 @@ #include "UI/ImDebugger/ImJitViewer.h" #include "UI/ImDebugger/ImGe.h" #include "UI/ImDebugger/ImConsole.h" +#include "UI/ImDebugger/ImCommand.h" // This is the main state container of the whole Dear ImGUI-based in-game cross-platform debugger. // @@ -162,28 +163,7 @@ public: void Draw(ImConfig &cfg); private: - bool AutoScroll = true; // Keep scrolling if already at the bottom. -}; - -enum class ImCmd { - NONE = 0, - TRIGGER_FIND_POPUP, - SHOW_IN_CPU_DISASM, - SHOW_IN_GE_DISASM, - SHOW_IN_MEMORY_VIEWER, // param is address, param2 is viewer index - SHOW_IN_PIXEL_VIEWER, // param is address, param2 is stride, |0x80000000 if depth, param3 is w/h - SHOW_IN_MEMORY_DUMPER, // param is address, param2 is size, param3 is mode -}; - -struct ImCommand { - ImCmd cmd; - uint32_t param; - uint32_t param2; - uint32_t param3; -}; - -struct ImControl { - ImCommand command; + bool AutoScroll = true; // Keep scrolling if already at the bottom. }; class ImDebugger { diff --git a/UI/UI.vcxproj b/UI/UI.vcxproj index c80c1c5eb5..8c5e56c65a 100644 --- a/UI/UI.vcxproj +++ b/UI/UI.vcxproj @@ -105,6 +105,7 @@ + diff --git a/UI/UI.vcxproj.filters b/UI/UI.vcxproj.filters index 272a1fbab5..6a456c1807 100644 --- a/UI/UI.vcxproj.filters +++ b/UI/UI.vcxproj.filters @@ -291,6 +291,9 @@ Screens + + ImDebugger +