Skip to content

Commit

Permalink
Made DLL loading also search the DLL's path for dependency resolution (
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Wiseguy authored Sep 27, 2024
1 parent b80bb21 commit 46797d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion librecomp/src/mods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class recomp::mods::DynamicLibrary {
static constexpr std::string_view PlatformExtension = ".dll";
DynamicLibrary() = default;
DynamicLibrary(const std::filesystem::path& path) {
native_handle = LoadLibraryW(path.c_str());
native_handle = LoadLibraryExW(std::filesystem::absolute(path).c_str(), nullptr, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);

if (good()) {
uint32_t* recomp_api_version;
Expand Down

0 comments on commit 46797d6

Please sign in to comment.