[Scummvm-cvs-logs] SF.net SVN: scummvm: [30990] scummvm/branches/branch-0-11-0/engines/saga/ sndres.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Feb 27 19:23:26 CET 2008
Revision: 30990
http://scummvm.svn.sourceforge.net/scummvm/?rev=30990&view=rev
Author: thebluegr
Date: 2008-02-27 10:23:25 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
(backport) Don't change the voice bank when no voice files are present. This will stop SAGA games from crashing when no voice files are present in talkie versions of ITE and IHNM (regression from commit #30648)
Modified Paths:
--------------
scummvm/branches/branch-0-11-0/engines/saga/sndres.cpp
Modified: scummvm/branches/branch-0-11-0/engines/saga/sndres.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/engines/saga/sndres.cpp 2008-02-27 18:17:50 UTC (rev 30989)
+++ scummvm/branches/branch-0-11-0/engines/saga/sndres.cpp 2008-02-27 18:23:25 UTC (rev 30990)
@@ -101,8 +101,13 @@
}
void SndRes::setVoiceBank(int serial) {
- if (_voiceSerial == serial) return;
+ if (_voiceSerial == serial)
+ return;
+ // If there are no voice files present, don't set the voice bank
+ if (!_vm->_voiceFilesExist)
+ return;
+
// Close previous voice bank file
if (_voiceSerial >= 0 && _voiceContext->file->isOpen())
_voiceContext->file->close();
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