Added support for combining a %ROM% variable with the %INJECT% variable

This commit is contained in:
Leon Styhre 2024-06-03 20:25:33 +02:00
parent 13ff970476
commit ca65fcbe8c

View file

@ -1582,6 +1582,7 @@ void FileData::launchGame()
#else
injectFile = Utils::String::replace(injectFile, "%BASENAME%",
Utils::String::replace(baseName, "\\", ""));
injectFile = Utils::String::replace(injectFile, "%ROM%", romRaw);
if (injectFile.front() != '/')
injectFile =
Utils::FileSystem::getParent(Utils::String::replace(romPath, "\\", "")) + "/" +