-
-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Taking such a directory tree as an example.
Game/
Plugins/
Game.exe
winmm.dll
dlsstweaks.ini
nvngx_dlss_new.dll
Launcher.exe
Launcher.exe runs Game.exe, which is the real entry of the game and loads DLSSTweaks dll. On startup, current directory is .../Game/. However, the game itself will soon change the current directory to something like .../Game/Plugins/, breaking the dll overriding feature. It will complain about missing nvngx_dlss_new.dll if we use nvngx_dlss = nvngx_dlss_new.dll. And if we use nvngx_dlss = Plugins/nvngx_dlss_new.dll, it won't work as .../Game/Plugins/Plugins/nvngx_dlss_new.dll is non-existant.
Currently I simply removed the check here, however if we support overriding using relative path to the DLSSTweaks dll, it would be wonderful, as we can create relocatable config for certain games.
DLSSTweaks/src/UserSettings.cpp
Lines 171 to 178 in 1d2fddb
| auto path = utility::ini_get_string_safe(ini, "DLLPathOverrides", key, ""); | |
| if (!path.empty() && !utility::exists_safe(path)) // empty path is allowed so that user can clear the override in local INIs | |
| { | |
| spdlog::warn("DLLPathOverrides: override for {} skipped as path {} doesn't exist", key, path); | |
| continue; | |
| } | |
| settings.dllPathOverrides[dllFileName] = path; |
Also, maybe we could log current directory when loading overridden dlls to better support trouble shooting.