aboutsummaryrefslogtreecommitdiff
path: root/gui/EventRecorder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/EventRecorder.cpp')
-rw-r--r--gui/EventRecorder.cpp17
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;
}