EVENTRECORDER: Fix build and obvious mistype error

This commit is contained in:
Le Philousophe 2024-06-02 17:05:43 +02:00
parent ac331f291f
commit 63c04eb700
2 changed files with 11 additions and 3 deletions

View File

@ -484,8 +484,14 @@ endif
ifdef ENABLE_EVENTRECORDER
MODULE_OBJS += \
mixer/null/null-mixer.o \
saves/recorder/recorder-saves.o
# SDL and null backend already add null-mixer
ifndef SDL_BACKEND
ifneq ($(BACKEND),null)
MODULE_OBJS += \
mixer/null/null-mixer.o
endif
endif
endif
ifdef USE_IMGUI

View File

@ -762,7 +762,8 @@ SDL_Surface *EventRecorder::getSurface(int width, int height) {
}
bool EventRecorder::switchMode() {
const Plugin *plugin = EngineMan.findPlugin(ConfMan.get("engineid"));
const Plugin *detectionPlugin = EngineMan.findPlugin(ConfMan.get("engineid"));
const Plugin *plugin = PluginMan.getEngineFromMetaEngine(detectionPlugin);
bool metaInfoSupport = plugin->get<MetaEngine>().hasFeature(MetaEngine::kSavesSupportMetaInfo);
bool featuresSupport = metaInfoSupport &&
g_engine->canSaveGameStateCurrently() &&
@ -810,7 +811,8 @@ bool EventRecorder::checkForContinueGame() {
void EventRecorder::deleteTemporarySave() {
if (_temporarySlot == -1) return;
const Plugin *plugin = EngineMan.findPlugin(ConfMan.get("engineid"));
const Plugin *detectionPlugin = EngineMan.findPlugin(ConfMan.get("engineid"));
const Plugin *plugin = PluginMan.getEngineFromMetaEngine(detectionPlugin);
const Common::String target = ConfMan.getActiveDomainName();
plugin->get<MetaEngine>().removeSaveState(target.c_str(), _temporarySlot);
_temporarySlot = -1;