mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Added support for a %GAMEDIRRAW% launch command variable
This commit is contained in:
parent
2055b30836
commit
541750243d
|
@ -1592,6 +1592,10 @@ void FileData::launchGame()
|
||||||
command = Utils::String::replace(command, "%GAMEDIR%",
|
command = Utils::String::replace(command, "%GAMEDIR%",
|
||||||
Utils::FileSystem::getEscapedPath(Utils::FileSystem::getParent(
|
Utils::FileSystem::getEscapedPath(Utils::FileSystem::getParent(
|
||||||
Utils::String::replace(romPath, "\"", ""))));
|
Utils::String::replace(romPath, "\"", ""))));
|
||||||
|
command = Utils::String::replace(
|
||||||
|
command, "%GAMEDIRRAW%",
|
||||||
|
Utils::String::replace(
|
||||||
|
Utils::FileSystem::getParent(Utils::String::replace(romPath, "\"", "")), "/", "\\"));
|
||||||
#else
|
#else
|
||||||
command = Utils::String::replace(command, "%ESPATH%", Utils::FileSystem::getExePath());
|
command = Utils::String::replace(command, "%ESPATH%", Utils::FileSystem::getExePath());
|
||||||
command = Utils::String::replace(command, "%EMUDIR%",
|
command = Utils::String::replace(command, "%EMUDIR%",
|
||||||
|
@ -1600,6 +1604,9 @@ void FileData::launchGame()
|
||||||
command = Utils::String::replace(command, "%GAMEDIR%",
|
command = Utils::String::replace(command, "%GAMEDIR%",
|
||||||
Utils::FileSystem::getEscapedPath(Utils::FileSystem::getParent(
|
Utils::FileSystem::getEscapedPath(Utils::FileSystem::getParent(
|
||||||
Utils::String::replace(romPath, "\\", ""))));
|
Utils::String::replace(romPath, "\\", ""))));
|
||||||
|
command = Utils::String::replace(
|
||||||
|
command, "%GAMEDIRRAW%",
|
||||||
|
Utils::FileSystem::getParent(Utils::String::replace(romPath, "\\", "")));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Trim any leading and trailing whitespace characters as they could cause launch issues.
|
// Trim any leading and trailing whitespace characters as they could cause launch issues.
|
||||||
|
|
Loading…
Reference in a new issue