[Scummvm-git-logs] scummvm master -> 7fa4d3daa7e7537d50791d77afed7be53c82696b
AndywinXp
noreply at scummvm.org
Sun Aug 11 16:26:20 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:
7fa4d3daa7 SCUMM: Add warning msg for sound config mismatches on savegame loading
Commit: 7fa4d3daa7e7537d50791d77afed7be53c82696b
https://github.com/scummvm/scummvm/commit/7fa4d3daa7e7537d50791d77afed7be53c82696b
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-08-11T18:26:12+02:00
Commit Message:
SCUMM: Add warning msg for sound config mismatches on savegame loading
Changed paths:
engines/scumm/saveload.cpp
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 36c314c68ac..6d7c829fe05 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -45,6 +45,7 @@
#include "backends/audiocd/audiocd.h"
#include "graphics/thumbnail.h"
+#include "gui/message.h"
namespace Scumm {
@@ -1949,12 +1950,29 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) {
s.syncArray(_roomVars, _numRoomVariables, Common::Serializer::Sint32LE, VER(38));
+ int currentSoundCard = VAR(VAR_SOUNDCARD);
+
// The variables grew from 16 to 32 bit.
if (s.getVersion() < VER(15))
s.syncArray(_scummVars, _numVariables, Common::Serializer::Sint16LE);
else
s.syncArray(_scummVars, _numVariables, Common::Serializer::Sint32LE);
+ if (s.isLoading() && VAR_SOUNDCARD != 0xFF && (_game.heversion < 70 && _game.version <= 6)) {
+ if (currentSoundCard != VAR(VAR_SOUNDCARD)) {
+ Common::String soundCards[] = {"PC Speaker", "IBM PCjr/Tandy", "Creative Music System", "AdLib", "Roland MT-32/CM-32L"};
+
+ GUI::MessageDialog dialog(
+ Common::U32String::format(_("Warning: incompatible sound settings detected between the current configuration and this saved game.\n\n"
+ "Current music device: %s (id %d)\nSave file music device: %s (id %d)\n\n"
+ "Loading will be attempted, but the game may behave incorrectly or crash.\n"
+ "Please change the audio configuration accordingly in order to properly load this save file."),
+ soundCards[currentSoundCard].c_str(), currentSoundCard, soundCards[VAR(VAR_SOUNDCARD)].c_str(), VAR(VAR_SOUNDCARD))
+ );
+ runDialog(dialog);
+ }
+ }
+
if (_game.id == GID_TENTACLE) // Maybe misplaced, but that's the main idea
_scummVars[120] = var120Backup;
if (_game.id == GID_INDY4)
More information about the Scummvm-git-logs
mailing list