mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 20:17:49 +00:00
BASE: Refactor EngineManager::createTargetForGame
This commit is contained in:
parent
5854585b33
commit
7f457f8e94
@ -773,15 +773,7 @@ Common::String EngineManager::createTargetForGame(const DetectedGame &game) {
|
||||
Common::String domain = game.preferredTarget;
|
||||
|
||||
assert(!domain.empty());
|
||||
if (ConfMan.hasGameDomain(domain)) {
|
||||
int suffixN = 1;
|
||||
Common::String gameid(domain);
|
||||
|
||||
while (ConfMan.hasGameDomain(domain)) {
|
||||
domain = gameid + Common::String::format("-%d", suffixN);
|
||||
suffixN++;
|
||||
}
|
||||
}
|
||||
domain = generateUniqueDomain(domain);
|
||||
|
||||
// Add the name domain
|
||||
ConfMan.addGameDomain(domain);
|
||||
|
Loading…
Reference in New Issue
Block a user