mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Added a %ROMRAWWIN% variable
This commit is contained in:
parent
ee0030edc8
commit
679b1b9638
|
|
@ -904,6 +904,10 @@ void FileData::launchGame()
|
||||||
std::string romPath {Utils::FileSystem::getEscapedPath(mPath)};
|
std::string romPath {Utils::FileSystem::getEscapedPath(mPath)};
|
||||||
std::string baseName {Utils::FileSystem::getStem(mPath)};
|
std::string baseName {Utils::FileSystem::getStem(mPath)};
|
||||||
std::string romRaw {Utils::FileSystem::getPreferredPath(mPath)};
|
std::string romRaw {Utils::FileSystem::getPreferredPath(mPath)};
|
||||||
|
#if !defined(_WIN64)
|
||||||
|
std::string romRawWindows {
|
||||||
|
Utils::String::replace(Utils::FileSystem::getPreferredPath(mPath), "/", "\\")};
|
||||||
|
#endif
|
||||||
|
|
||||||
// For the special case where a directory has a supported file extension and is therefore
|
// For the special case where a directory has a supported file extension and is therefore
|
||||||
// interpreted as a file, check if there is a matching filename inside the directory.
|
// interpreted as a file, check if there is a matching filename inside the directory.
|
||||||
|
|
@ -1780,6 +1784,9 @@ void FileData::launchGame()
|
||||||
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, "%FILENAME%", fileName);
|
||||||
command = Utils::String::replace(command, "%ROMRAW%", romRaw);
|
command = Utils::String::replace(command, "%ROMRAW%", romRaw);
|
||||||
|
#if !defined(_WIN64)
|
||||||
|
command = Utils::String::replace(command, "%ROMRAWWIN%", romRawWindows);
|
||||||
|
#endif
|
||||||
command = Utils::String::replace(command, "%ROMPATH%",
|
command = Utils::String::replace(command, "%ROMPATH%",
|
||||||
Utils::FileSystem::getEscapedPath(getROMDirectory()));
|
Utils::FileSystem::getEscapedPath(getROMDirectory()));
|
||||||
#else
|
#else
|
||||||
|
|
@ -1909,6 +1916,8 @@ void FileData::launchGame()
|
||||||
extraValue =
|
extraValue =
|
||||||
Utils::String::replace(extraValue, "%ROMPATHRAW%", getROMDirectory());
|
Utils::String::replace(extraValue, "%ROMPATHRAW%", getROMDirectory());
|
||||||
extraValue = Utils::String::replace(extraValue, "%ROMRAW%", romRaw);
|
extraValue = Utils::String::replace(extraValue, "%ROMRAW%", romRaw);
|
||||||
|
extraValue =
|
||||||
|
Utils::String::replace(extraValue, "%ROMRAWWIN%", romRawWindows);
|
||||||
extraValue = Utils::String::replace(extraValue, "%BASENAME%", baseName);
|
extraValue = Utils::String::replace(extraValue, "%BASENAME%", baseName);
|
||||||
extraValue = Utils::String::replace(extraValue, "//", "/");
|
extraValue = Utils::String::replace(extraValue, "//", "/");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue