[Scummvm-git-logs] scummvm master -> 127062cdbf4895b6040d2b86574016d694d356d1

AndywinXp noreply at scummvm.org
Thu Sep 14 18:11:53 UTC 2023


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:
127062cdbf SCUMM: IMUSE: Stop speech when loading temporary save state


Commit: 127062cdbf4895b6040d2b86574016d694d356d1
    https://github.com/scummvm/scummvm/commit/127062cdbf4895b6040d2b86574016d694d356d1
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-09-14T20:11:47+02:00

Commit Message:
SCUMM: IMUSE: Stop speech when loading temporary save state

This fixes an inaccuracy in situations where a talkie
continues after exiting from a temporary save state,
e.g. looking at the National Archeology journal in Indy4
and exiting the screen before speech is over.

Changed paths:
    engines/scumm/saveload.cpp


diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 84e73f472ec..97614316046 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -674,7 +674,7 @@ bool ScummEngine::loadState(int slot, bool compat, Common::String &filename) {
 	if (hdr.ver == VER(7))
 		hdr.ver = VER(8);
 
-	hdr.name[sizeof(hdr.name)-1] = 0;
+	hdr.name[sizeof(hdr.name) - 1] = 0;
 	_saveLoadDescription = hdr.name;
 
 	// Set to 0 during load to minimize stuttering
@@ -693,8 +693,13 @@ bool ScummEngine::loadState(int slot, bool compat, Common::String &filename) {
 	// If we don't have iMUSE at all we may as well stop the sounds. The previous
 	// default behavior here was to stopAllSounds on all state restores.
 
-	if (!_imuse || _saveSound || !_saveTemporaryState)
+	if (!_imuse || _saveSound || !_saveTemporaryState) {
 		_sound->stopAllSounds();
+	} else if (_saveTemporaryState && !_imuseDigital) {
+		// Still, we have to stop the talking sound even
+		// if the save state is temporary.
+		_sound->stopTalkSound();
+	}
 
 #ifdef ENABLE_SCUMM_7_8
 	if (_imuseDigital) {




More information about the Scummvm-git-logs mailing list