mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Merge pull request #2665 from AdmiralCurtiss/relative-memory-card-paths
GameCube Config: Store paths relatively when selected file is within Dolphin's directory. (Windows)
This commit is contained in:
@ -731,8 +731,12 @@ std::string& GetExeDirectory()
|
||||
if (DolphinPath.empty())
|
||||
{
|
||||
TCHAR Dolphin_exe_Path[2048];
|
||||
TCHAR Dolphin_exe_Clean_Path[MAX_PATH];
|
||||
GetModuleFileName(nullptr, Dolphin_exe_Path, 2048);
|
||||
DolphinPath = TStrToUTF8(Dolphin_exe_Path);
|
||||
if (_tfullpath(Dolphin_exe_Clean_Path, Dolphin_exe_Path, MAX_PATH) != nullptr)
|
||||
DolphinPath = TStrToUTF8(Dolphin_exe_Clean_Path);
|
||||
else
|
||||
DolphinPath = TStrToUTF8(Dolphin_exe_Path);
|
||||
DolphinPath = DolphinPath.substr(0, DolphinPath.find_last_of('\\'));
|
||||
}
|
||||
return DolphinPath;
|
||||
|
Reference in New Issue
Block a user