[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.18,1.19 scummvm.cpp,1.62,1.63

Pawe? Ko?odziejski aquadran at users.sourceforge.net
Sun Oct 27 02:03:02 CEST 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv17237

Modified Files:
	dialogs.cpp scummvm.cpp 
Log Message:
check if _imuse is initialized

Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- dialogs.cpp	24 Oct 2002 01:36:18 -0000	1.18
+++ dialogs.cpp	27 Oct 2002 10:02:11 -0000	1.19
@@ -596,8 +596,11 @@
 		_scumm->_sound->_sound_volume_music = _soundVolumeMusic;	// Music
 		_scumm->_sound->_sound_volume_sfx = _soundVolumeSfx;	// SFX
 		
-		_scumm->_imuse->set_music_volume(_soundVolumeMusic);
-		_scumm->_imuse->set_master_volume(_soundVolumeMaster);
+		if (_scumm->_imuse) {
+			_scumm->_imuse->set_music_volume(_soundVolumeMusic);
+			_scumm->_imuse->set_master_volume(_soundVolumeMaster);
+		}
+
 		_scumm->_mixer->setVolume(_soundVolumeSfx);
 		_scumm->_mixer->setMusicVolume(_soundVolumeMusic);
 		

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- scummvm.cpp	24 Oct 2002 06:28:54 -0000	1.62
+++ scummvm.cpp	27 Oct 2002 10:02:11 -0000	1.63
@@ -1060,12 +1060,16 @@
 		_sound->_sound_volume_master-=5;
 		if (_sound->_sound_volume_master < 0)
 			_sound->_sound_volume_master = 0;
-		_imuse->set_master_volume(_sound->_sound_volume_master);
+		if (_imuse) {
+			_imuse->set_master_volume(_sound->_sound_volume_master);
+		}
 	} else if (_lastKeyHit == ']') { // ] volume down
 		_sound->_sound_volume_master+=5;
 		if (_sound->_sound_volume_master > 128)
 			_sound->_sound_volume_master = 128;		
-		_imuse->set_master_volume(_sound->_sound_volume_master);
+		if (_imuse) {
+			_imuse->set_master_volume(_sound->_sound_volume_master);
+		}
 	} else if (_lastKeyHit == '-') { // - text speed down
 		_defaultTalkDelay+=5;
 		if (_defaultTalkDelay > 90)





More information about the Scummvm-git-logs mailing list