[Scummvm-cvs-logs] SF.net SVN: scummvm:[54197] scummvm/trunk/engines/sci/engine/savegame.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Nov 11 11:09:58 CET 2010


Revision: 54197
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54197&view=rev
Author:   thebluegr
Date:     2010-11-11 10:09:57 +0000 (Thu, 11 Nov 2010)

Log Message:
-----------
SCI: Fixed bug #3104624 - "PQ3: Crash when loading saved game on the highway"

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/savegame.cpp

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-11-11 06:18:23 UTC (rev 54196)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-11-11 10:09:57 UTC (rev 54197)
@@ -620,6 +620,14 @@
 			(*i)->soundRes = 0;
 		}
 		if ((*i)->status == kSoundPlaying) {
+			// Sync the sound object's selectors related to playing with the stored
+			// ones in the playlist, as they may have been invalidated when loading.
+			// Refer to bug #3104624.
+			writeSelectorValue(_segMan, (*i)->soundObj, SELECTOR(loop), (*i)->loop);
+			writeSelectorValue(_segMan, (*i)->soundObj, SELECTOR(priority), (*i)->priority);
+			if (_soundVersion >= SCI_VERSION_1_EARLY)
+				writeSelectorValue(_segMan, (*i)->soundObj, SELECTOR(vol), (*i)->volume);
+
 			processPlaySound((*i)->soundObj);
 		}
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list