[Scummvm-git-logs] scummvm master -> 4c0ff2b02311e8c6a112d6825bfb45cc4335f5e0

athrxx athrxx at scummvm.org
Fri Jan 22 01:17:42 UTC 2021


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:
4c0ff2b023 AGOS: (ELVIRA/PC98/Jp) - add paranoia checks  to sound driver


Commit: 4c0ff2b02311e8c6a112d6825bfb45cc4335f5e0
    https://github.com/scummvm/scummvm/commit/4c0ff2b02311e8c6a112d6825bfb45cc4335f5e0
Author: athrxx (athrxx at scummvm.org)
Date: 2021-01-22T02:16:49+01:00

Commit Message:
AGOS: (ELVIRA/PC98/Jp) - add paranoia checks  to sound driver

Changed paths:
    engines/agos/drivers/accolade/pc98.cpp


diff --git a/engines/agos/drivers/accolade/pc98.cpp b/engines/agos/drivers/accolade/pc98.cpp
index d2f3a15d95..21718c1651 100644
--- a/engines/agos/drivers/accolade/pc98.cpp
+++ b/engines/agos/drivers/accolade/pc98.cpp
@@ -207,7 +207,7 @@ void PC98CommonDriver::send(uint32 b) {
 }
 
 void PC98CommonDriver::setTimerCallback(void *timerParam, Common::TimerManager::TimerProc timerProc) {
-	delete _timerCb; 
+	delete _timerCb;
 	_timerCb = (_isOpen && timerParam && timerProc) ? new TimerCb(timerProc, timerParam) : 0;
 }
 
@@ -220,12 +220,15 @@ uint32 PC98CommonDriver::property(int prop, uint32 param) {
 		res = v;
 		if ((int32)param != -1)
 			v = param & 0x1ff;
-		setVolume(_musicVolume, _sfxVolume);
+		if (_isOpen)
+			setVolume(_musicVolume, _sfxVolume);
 		break;
 	}
-	case kPropPause:
-		pause(param);
+	case kPropPause: {
+		if (_isOpen)
+			pause(param);
 		break;
+	}
 	default:
 		break;
 	}
@@ -513,7 +516,7 @@ const uint8 PC98FMDriver::_instrumentPatches[16][25] = {
 const uint8 PC98FMDriver::_ngMapping[76] = {
 	0x18, 0x1c, 0x3c, 0x20, 0x3e, 0x24, 0x40, 0x28,	0x2c, 0x38, 0x30, 0x3c, 0x00, 0x00, 0x36, 0x00,	0x38, 0x00, 0x00,
 	0x00, 0x16, 0x11, 0x16, 0x16, 0x11, 0x16, 0x11, 0x16, 0x11, 0x0f, 0x32, 0x00, 0x00, 0x0d, 0x00, 0x10, 0x1f, 0x1f,
-	0x0a, 0x08,	0x0a, 0x19, 0x04, 0x19, 0x04, 0x14, 0x04, 0x14, 0x0f, 0x0c, 0x0f, 0x0c, 0xff, 0xff, 0x0d, 0xff,	0x12,
+	0x0a, 0x08, 0x0a, 0x19, 0x04, 0x19, 0x04, 0x14, 0x04, 0x14, 0x0f, 0x0c, 0x0f, 0x0c, 0xff, 0xff, 0x0d, 0xff,	0x12,
 	0xff, 0xff, 0xff, 0x0f, 0x19, 0x0f, 0x0f, 0x19, 0x0f, 0x19, 0x0f, 0x19, 0x14, 0x06, 0xff, 0xff, 0x0f, 0xff, 0x00
 };
 




More information about the Scummvm-git-logs mailing list