sselph
Participant
Post count: 170

This comes from emulationstation the code that does the replace only looks for a single %ROM% instance.

This is the replace call:
https://github.com/Aloshi/EmulationStation/blob/d89ab913abdd90e559e48a38a07fd571cbf8a607/es-app/src/SystemData.cpp#L114

This is the replace code:
https://github.com/Aloshi/EmulationStation/blob/d89ab913abdd90e559e48a38a07fd571cbf8a607/es-app/src/SystemData.cpp#L64

You could send a pull request to alter the replace code to something like the following. I don’t write c++ so not sure if it is 100% correct.

size_t pos = str.find(replace);

while (pos != std::string::npos) {
    str.replace(pos, replace.length(), with.c_str(), with.length());
    pos = str.find(replace, pos + with.length());
}
return str;