diff options
author | Bastien Bouclet | 2016-09-15 18:39:45 +0200 |
---|---|---|
committer | Bastien Bouclet | 2019-11-03 11:43:00 +0100 |
commit | bb813719b56a3e2a51b7c73385d036f61fdde584 (patch) | |
tree | 098d51552ed8a5afde854cd8ed00a5f3d7ddc87e /gui/EventRecorder.cpp | |
parent | 9c8bd056d6d597a10f7f653b559dc34cd2bd2be9 (diff) | |
download | scummvm-rg350-bb813719b56a3e2a51b7c73385d036f61fdde584.tar.gz scummvm-rg350-bb813719b56a3e2a51b7c73385d036f61fdde584.tar.bz2 scummvm-rg350-bb813719b56a3e2a51b7c73385d036f61fdde584.zip |
ENGINES: Change targets to have an 'engine ID'
The engine ID identifies which engine should be used to launch the target.
Also remove the 'single ID' system. Different games from engines that used
that system now have different game IDs.
Also-By: Matthew Hoops <clone2727@gmail.com>
Diffstat (limited to 'gui/EventRecorder.cpp')
-rw-r--r-- | gui/EventRecorder.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp index d249ea4eff..a7f6e1be65 100644 --- a/gui/EventRecorder.cpp +++ b/gui/EventRecorder.cpp @@ -599,7 +599,7 @@ void EventRecorder::setFileHeader() { return; } TimeDate t; - PlainGameDescriptor desc = EngineMan.findGame(ConfMan.getActiveDomainName()); + PlainGameDescriptor desc = EngineMan.findTarget(ConfMan.getActiveDomainName()); g_system->getTimeAndDate(t); if (_author.empty()) { setAuthor("Unknown Author"); @@ -618,9 +618,7 @@ SDL_Surface *EventRecorder::getSurface(int width, int height) { } bool EventRecorder::switchMode() { - const Common::String gameId = ConfMan.get("gameid"); - const Plugin *plugin = nullptr; - EngineMan.findGame(gameId, &plugin); + const Plugin *plugin = EngineMan.findPlugin(ConfMan.get("engineid")); bool metaInfoSupport = plugin->get<MetaEngine>().hasFeature(MetaEngine::kSavesSupportMetaInfo); bool featuresSupport = metaInfoSupport && g_engine->canSaveGameStateCurrently() && @@ -630,8 +628,10 @@ bool EventRecorder::switchMode() { return false; } + const Common::String target = ConfMan.getActiveDomainName(); + SaveStateList saveList = plugin->get<MetaEngine>().listSaves(target.c_str()); + int emptySlot = 1; - SaveStateList saveList = plugin->get<MetaEngine>().listSaves(gameId.c_str()); for (SaveStateList::const_iterator x = saveList.begin(); x != saveList.end(); ++x) { int saveSlot = x->getSaveSlot(); if (saveSlot == 0) { @@ -666,10 +666,9 @@ bool EventRecorder::checkForContinueGame() { void EventRecorder::deleteTemporarySave() { if (_temporarySlot == -1) return; - const Common::String gameId = ConfMan.get("gameid"); - const Plugin *plugin = 0; - EngineMan.findGame(gameId, &plugin); - plugin->get<MetaEngine>().removeSaveState(gameId.c_str(), _temporarySlot); + const Plugin *plugin = EngineMan.findPlugin(ConfMan.get("engineid")); + const Common::String target = ConfMan.getActiveDomainName(); + plugin->get<MetaEngine>().removeSaveState(target.c_str(), _temporarySlot); _temporarySlot = -1; } |