mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Added a %GAMEENTRYDIR% variable to be used with the %STARTDIR% variable.
This commit is contained in:
parent
d8df9cde43
commit
749f36fdfe
|
@ -1264,6 +1264,9 @@ void FileData::launchGame()
|
|||
startDirectory = Utils::String::replace(
|
||||
startDirectory, "%GAMEDIR%",
|
||||
Utils::FileSystem::getParent(Utils::String::replace(romPath, "\"", "")));
|
||||
|
||||
startDirectory = Utils::String::replace(startDirectory, "%GAMEENTRYDIR%",
|
||||
Utils::String::replace(romPath, "\"", ""));
|
||||
#else
|
||||
startDirectory = Utils::String::replace(
|
||||
startDirectory, "%EMUDIR%",
|
||||
|
@ -1272,14 +1275,17 @@ void FileData::launchGame()
|
|||
startDirectory = Utils::String::replace(
|
||||
startDirectory, "%GAMEDIR%",
|
||||
Utils::FileSystem::getParent(Utils::String::replace(romPath, "\\", "")));
|
||||
|
||||
startDirectory = Utils::String::replace(startDirectory, "%GAMEENTRYDIR%",
|
||||
Utils::String::replace(romPath, "\\", ""));
|
||||
#endif
|
||||
if (!Utils::FileSystem::isDirectory(startDirectory)) {
|
||||
Utils::FileSystem::createDirectory(startDirectory);
|
||||
|
||||
if (!Utils::FileSystem::isDirectory(startDirectory)) {
|
||||
LOG(LogError)
|
||||
<< "Couldn't launch game, directory defined by %STARTDIR% could not be "
|
||||
"created, permission problems?";
|
||||
LOG(LogError) << "Couldn't launch game, directory \"" << startDirectory
|
||||
<< "\" defined by %STARTDIR% could not be created, "
|
||||
"permission problems?";
|
||||
LOG(LogError) << "Raw emulator launch command:";
|
||||
LOG(LogError) << commandRaw;
|
||||
|
||||
|
|
Loading…
Reference in a new issue