[Scummvm-git-logs] scummvm master -> 63c04eb700771fee93b1d8b0faa4603b8cfc1c69

lephilousophe noreply at scummvm.org
Wed Jun 5 17:02:40 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
63c04eb700 EVENTRECORDER: Fix build and obvious mistype error


Commit: 63c04eb700771fee93b1d8b0faa4603b8cfc1c69
    https://github.com/scummvm/scummvm/commit/63c04eb700771fee93b1d8b0faa4603b8cfc1c69
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-06-05T19:02:18+02:00

Commit Message:
EVENTRECORDER: Fix build and obvious mistype error

Changed paths:
    backends/module.mk
    gui/EventRecorder.cpp


diff --git a/backends/module.mk b/backends/module.mk
index e5581ed7ca6..5d885c96ca0 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -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
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index 31637af9971..15bb539d7e5 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -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;




More information about the Scummvm-git-logs mailing list