mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-24 23:25:38 +00:00
Added a %FILENAME% variable to extract the filename including the file extension when used in es_systems.xml
This commit is contained in:
parent
403b986be7
commit
d128489ba8
|
@ -882,6 +882,7 @@ void FileData::launchGame()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string fileName {baseName + Utils::FileSystem::getExtension(romPath)};
|
||||||
const std::string romRaw {Utils::FileSystem::getPreferredPath(mPath)};
|
const std::string romRaw {Utils::FileSystem::getPreferredPath(mPath)};
|
||||||
const std::string esPath {Utils::FileSystem::getExePath()};
|
const std::string esPath {Utils::FileSystem::getExePath()};
|
||||||
bool runInBackground {false};
|
bool runInBackground {false};
|
||||||
|
@ -1484,6 +1485,7 @@ void FileData::launchGame()
|
||||||
// Replace the remaining variables with their actual values.
|
// Replace the remaining variables with their actual values.
|
||||||
command = Utils::String::replace(command, "%ROM%", romPath);
|
command = Utils::String::replace(command, "%ROM%", romPath);
|
||||||
command = Utils::String::replace(command, "%BASENAME%", baseName);
|
command = Utils::String::replace(command, "%BASENAME%", baseName);
|
||||||
|
command = Utils::String::replace(command, "%FILENAME%", fileName);
|
||||||
command = Utils::String::replace(command, "%ROMRAW%", romRaw);
|
command = Utils::String::replace(command, "%ROMRAW%", romRaw);
|
||||||
command = Utils::String::replace(command, "%ROMPATH%",
|
command = Utils::String::replace(command, "%ROMPATH%",
|
||||||
Utils::FileSystem::getEscapedPath(getROMDirectory()));
|
Utils::FileSystem::getEscapedPath(getROMDirectory()));
|
||||||
|
|
Loading…
Reference in a new issue