Skip to content

Commit b065a7e

Browse files
authored
Change base path to ASI location when loaded via an ASI loader (#357)
1 parent 08aab23 commit b065a7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/dll_main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,10 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD fdwReason, LPVOID)
142142
const bool is_dxgi = _wcsicmp(module_name.c_str(), L"dxgi") == 0;
143143
const bool is_opengl = _wcsicmp(module_name.c_str(), L"opengl32") == 0;
144144
const bool is_dinput = _wcsnicmp(module_name.c_str(), L"dinput", 6) == 0;
145+
const bool is_asi = g_reshade_dll_path.extension() == L".asi";
145146

146147
// UWP apps do not have write access to the application directory, so never default the base path to it for them
147-
const bool default_base_to_target_executable_path = !is_d3d && !is_dxgi && !is_opengl && !is_dinput && !is_uwp_app();
148+
const bool default_base_to_target_executable_path = !is_d3d && !is_dxgi && !is_opengl && !is_dinput && !is_asi && !is_uwp_app();
148149

149150
g_reshade_base_path = get_base_path(default_base_to_target_executable_path);
150151

0 commit comments

Comments
 (0)