diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index dca55cd53..bc37847a0 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -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 esPath {Utils::FileSystem::getExePath()}; bool runInBackground {false}; @@ -1484,6 +1485,7 @@ void FileData::launchGame() // Replace the remaining variables with their actual values. command = Utils::String::replace(command, "%ROM%", romPath); 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, "%ROMPATH%", Utils::FileSystem::getEscapedPath(getROMDirectory()));