From 369c9cdd0fa03b6b2f687235efeed64e0ac34f4f Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 1 Jul 2021 17:55:00 +0200 Subject: [PATCH] Added support for using the ROMPATH variable in the staticpath find rule. --- es-app/src/FileData.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 7b868ef28..22fcdfee6 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1212,6 +1212,8 @@ std::string FileData::findEmulatorPath(std::string& command) path = Utils::FileSystem::expandHomePath(path); // If %ESPATH% is used for the rule, then expand it to the binary directory of ES-DE. path = Utils::String::replace(path, "%ESPATH%", Utils::FileSystem::getExePath()); + // Likewise for the %ROMPATH% variable which expands to the configured ROM directory. + path = Utils::String::replace(path, "%ROMPATH%", getROMDirectory()); #if defined(_WIN64) path = Utils::String::replace(path, "/", "\\"); #endif