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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Jul 6 13:33:31 CEST 2009


Revision: 42172
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42172&view=rev
Author:   thebluegr
Date:     2009-07-06 11:33:28 +0000 (Mon, 06 Jul 2009)

Log Message:
-----------
When a song isn't found, send a "stop handle" event so that the engine won't wait forever (e.g. in SQ4CD, perhaps others)

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

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2009-07-06 11:19:37 UTC (rev 42171)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2009-07-06 11:33:28 UTC (rev 42172)
@@ -809,7 +809,10 @@
 		if (!GET_SEL32V(obj, nodePtr) && obj.segment) {
 			if (!s->resmgr->testResource(ResourceId(kResourceTypeSound, number))) {
 				warning("Could not open song number %d", number);
-				return NULL_REG;
+				// Send a "stop handle" event so that the engine won't wait forever here
+				s->_sound.sfx_song_set_status(handle, SOUND_STATUS_STOPPED);
+				PUT_SEL32V(obj, signal, -1);
+				return s->r_acc;
 			}
 
 			debugC(2, kDebugLevelSound, "Initializing song number %d\n", number);


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