Skip to content

Commit

Permalink
chore: remove Windows.h from CrashDumper
Browse files Browse the repository at this point in the history
  • Loading branch information
localcc committed Jun 4, 2024
1 parent 73d3b65 commit 6cd4080
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion UE4SS/include/CrashDumper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

#include <memory>

#include <polyhook2/PE/IatHook.hpp>
namespace PLH
{
class IatHook;
}

namespace RC
{
Expand Down
7 changes: 4 additions & 3 deletions UE4SS/src/CrashDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <bit>

#include <UE4SSProgram.hpp>
#include <Unreal/Core/Windows/WindowsHWrapper.hpp>

#define NOMINMAX
#include <Windows.h>
#include <polyhook2/PE/IatHook.hpp>
#include <dbghelp.h>

namespace fs = std::filesystem;
Expand All @@ -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;

Expand Down
4 changes: 3 additions & 1 deletion UE4SS/src/UE4SSProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
#include <Unreal/World.hpp>
#include <UnrealDef.hpp>

#include <polyhook2/PE/IatHook.hpp>

namespace RC
{
// Commented out because this system (turn off hotkeys when in-game console is open) it doesn't work properly.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6cd4080

Please sign in to comment.