Skip to content

Commit

Permalink
DD2: Spoof DLLs at additional points to fix crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Mar 27, 2024
1 parent d0d42ba commit e5d7d24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ void startup_thread(HMODULE reframework_module) {
utility::spoof_module_paths_in_exe_dir();
utility::unlink(*our_dll);
}
#elif defined (DD2)
utility::spoof_module_paths_in_exe_dir();
#endif
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/REFramework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ bool REFramework::initialize_game_data() {
std::scoped_lock _{this->m_startup_mutex};

try {
#if defined(MHRISE)
#if defined(MHRISE) || defined(DD2)
utility::spoof_module_paths_in_exe_dir();
#endif
reframework::initialize_sdk();
Expand Down Expand Up @@ -1623,7 +1623,7 @@ bool REFramework::initialize_game_data() {
spdlog::error("Initialization of mods failed. Reason: exception thrown.");
}

#if defined(MHRISE)
#if defined(MHRISE) || defined(DD2)
utility::spoof_module_paths_in_exe_dir();
#endif
spdlog::info("Game data initialization thread finished");
Expand Down

0 comments on commit e5d7d24

Please sign in to comment.