From 6cd40805faac7506ee48ecb39b4042697e446f1a Mon Sep 17 00:00:00 2001 From: localcc Date: Sat, 1 Jun 2024 21:41:38 +0200 Subject: [PATCH] chore: remove Windows.h from CrashDumper --- UE4SS/include/CrashDumper.hpp | 5 ++++- UE4SS/src/CrashDumper.cpp | 7 ++++--- UE4SS/src/UE4SSProgram.cpp | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/UE4SS/include/CrashDumper.hpp b/UE4SS/include/CrashDumper.hpp index b2ab6f7c7..297e5a1b7 100644 --- a/UE4SS/include/CrashDumper.hpp +++ b/UE4SS/include/CrashDumper.hpp @@ -2,7 +2,10 @@ #include -#include +namespace PLH +{ + class IatHook; +} namespace RC { diff --git a/UE4SS/src/CrashDumper.cpp b/UE4SS/src/CrashDumper.cpp index e4695bc33..5e35de5f9 100644 --- a/UE4SS/src/CrashDumper.cpp +++ b/UE4SS/src/CrashDumper.cpp @@ -6,9 +6,9 @@ #include #include +#include -#define NOMINMAX -#include +#include #include namespace fs = std::filesystem; @@ -19,7 +19,8 @@ using std::chrono::time_point_cast; namespace RC { - const int DumpType = MiniDumpNormal | MiniDumpWithThreadInfo | MiniDumpWithIndirectlyReferencedMemory | MiniDumpWithModuleHeaders | MiniDumpWithAvxXStateContext; + const int DumpType = + MiniDumpNormal | MiniDumpWithThreadInfo | MiniDumpWithIndirectlyReferencedMemory | MiniDumpWithModuleHeaders | MiniDumpWithAvxXStateContext; static bool FullMemoryDump = false; diff --git a/UE4SS/src/UE4SSProgram.cpp b/UE4SS/src/UE4SSProgram.cpp index acccb005b..e753c31d3 100644 --- a/UE4SS/src/UE4SSProgram.cpp +++ b/UE4SS/src/UE4SSProgram.cpp @@ -55,6 +55,8 @@ #include #include +#include + namespace RC { // Commented out because this system (turn off hotkeys when in-game console is open) it doesn't work properly. @@ -382,7 +384,7 @@ namespace RC std::filesystem::path game_exe_path = exe_path_buffer; std::filesystem::path game_directory_path = game_exe_path.parent_path(); m_legacy_root_directory = game_directory_path; - + m_working_directory = m_root_directory; m_mods_directory = m_working_directory / "Mods"; m_game_executable_directory = game_directory_path;