mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 12:50:51 +00:00
Fix bug #1544799: "ALL: Engine creates launcher entry when failing to launch"
svn-id: r40745
This commit is contained in:
parent
43f58b2869
commit
8e4b31f522
@ -144,6 +144,17 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
|
||||
ConfMan.getActiveDomainName().c_str(),
|
||||
dir.getPath().c_str()
|
||||
);
|
||||
|
||||
// Autoadded is set only when no path was provided and
|
||||
// the game is run from command line.
|
||||
//
|
||||
// Thus, we remove this garbage entry
|
||||
//
|
||||
// Fixes bug #1544799
|
||||
if (ConfMan.hasKey("autoadded")) {
|
||||
ConfMan.removeGameDomain(ConfMan.getActiveDomainName().c_str());
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -244,6 +244,18 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine)
|
||||
path = ConfMan.get("path");
|
||||
} else {
|
||||
path = ".";
|
||||
|
||||
// This situation may happen only when game was
|
||||
// launched from a command line with wrong target and
|
||||
// no path was provided.
|
||||
//
|
||||
// A dummy entry will get created and will keep game path
|
||||
// We mark this entry, so it will not be added to the
|
||||
// config file.
|
||||
//
|
||||
// Fixes bug #1544799
|
||||
ConfMan.set("autoadded", "true");
|
||||
|
||||
warning("No path was provided. Assuming the data files are in the current directory");
|
||||
}
|
||||
Common::FSNode dir(path);
|
||||
|
Loading…
Reference in New Issue
Block a user