[Scummvm-git-logs] scummvm master -> fd5e608612a93716492a8ef9fed899b65ecd632c
AndywinXp
noreply at scummvm.org
Mon Sep 2 20:58:02 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:
fd5e608612 SCUMM: MONKEY1 (Macintosh): Fix crash when loading 2.8.0 saves
Commit: fd5e608612a93716492a8ef9fed899b65ecd632c
https://github.com/scummvm/scummvm/commit/fd5e608612a93716492a8ef9fed899b65ecd632c
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-09-02T22:57:56+02:00
Commit Message:
SCUMM: MONKEY1 (Macintosh): Fix crash when loading 2.8.0 saves
This fixes #15353:
"SCUMM: MONKEY1 (Macintosh) Crash in saveLoadWithSerializer loading 2.8.0 saves on 2.9.0git"
I didn't take into account the fact that this version had 0xFFFF as VAR_SOUNDCARD,
at startup. I'm not disabling this soundcard detection thingy for the Mac versions for now,
because I'm not sure how different sound quality settings behave during saving/loading.
Changed paths:
engines/scumm/saveload.cpp
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 61f4a1a93a1..8bd356e2f38 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1954,6 +1954,10 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) {
s.syncArray(_roomVars, _numRoomVariables, Common::Serializer::Sint32LE, VER(38));
int currentSoundCard = VAR_SOUNDCARD != 0xFF ? VAR(VAR_SOUNDCARD) : -1;
+ bool isMonkey1MacDefaultSoundCardValue =
+ (_game.id == GID_MONKEY &&
+ (_sound->_musicType & MidiDriverFlags::MDT_MACINTOSH) &&
+ currentSoundCard == 0xFFFF);
// The variables grew from 16 to 32 bit.
if (s.getVersion() < VER(15))
@@ -1962,7 +1966,7 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) {
s.syncArray(_scummVars, _numVariables, Common::Serializer::Sint32LE);
if (s.isLoading() && VAR_SOUNDCARD != 0xFF && (_game.heversion < 70 && _game.version <= 6)) {
- if (currentSoundCard != VAR(VAR_SOUNDCARD)) {
+ if (currentSoundCard != VAR(VAR_SOUNDCARD) && !isMonkey1MacDefaultSoundCardValue) {
Common::String soundCards[] = {"PC Speaker", "IBM PCjr/Tandy", "Creative Music System", "AdLib", "Roland MT-32/CM-32L"};
GUI::MessageDialog dialog(
More information about the Scummvm-git-logs
mailing list