Added support for using the ROMPATH variable in the staticpath find rule.

This commit is contained in:
Leon Styhre 2021-07-01 17:55:00 +02:00
parent 4bbbd902be
commit 369c9cdd0f

View file

@ -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