[Scummvm-git-logs] scummvm master -> 3ac55f9246c52e998d5e6a15e5fcb526d1c51c2e

athrxx noreply at scummvm.org
Wed Sep 7 21:08:13 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ee4fb8749d SCUMM: (IMS) - properly distinguish between PC Speaker and AdLib
3ac55f9246 SCUMM: (IMS) - add some checks during init


Commit: ee4fb8749dc04620fe5523f4b770111c54df7bac
    https://github.com/scummvm/scummvm/commit/ee4fb8749dc04620fe5523f4b770111c54df7bac
Author: athrxx (athrxx at scummvm.org)
Date: 2022-09-07T23:07:34+02:00

Commit Message:
SCUMM: (IMS) - properly distinguish between PC Speaker and AdLib

Changed paths:
    engines/scumm/imuse/imuse_player.cpp


diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp
index d10011c0e2e..cdd1633a96b 100644
--- a/engines/scumm/imuse/imuse_player.cpp
+++ b/engines/scumm/imuse/imuse_player.cpp
@@ -112,7 +112,7 @@ bool Player::startSound(int sound, MidiDriver *midi) {
 	// IMuseInternal::supportsPercussion() filters out more non-MIDI things than IMuseInternal::isMIDI(),
 	// but still not the AdLib in Samnmax, so we make an extra test for that...
 	_isGM = (_supportsPercussion && !(_se->_game_id == GID_SAMNMAX && !_se->_midi_native && _se->_midi_adlib) && !_isMT32);
-	_isAdLibOrFMTowns = (_se->_midi_adlib && !_isMT32 && !_isGM);
+	_isAdLibOrFMTowns = (_se->_midi_adlib && !_isMT32 && !_isGM && !_se->_pcSpeaker);
 
 	_parts = nullptr;
 	_active = true;
@@ -1037,7 +1037,7 @@ void Player::fixAfterLoad() {
 		// IMuseInternal::supportsPercussion() filters out more non-MIDI things than IMuseInternal::isMIDI(),
 		// but still not the AdLib in SAMNMAX, so we make an extra test for that...
 		_isGM = (_supportsPercussion && !(_se->_game_id == GID_SAMNMAX && !_se->_midi_native && _se->_midi_adlib) && !_isMT32);
-		_isAdLibOrFMTowns = (_se->_midi_adlib && !_isMT32 && !_isGM);
+		_isAdLibOrFMTowns = (_se->_midi_adlib && !_isMT32 && !_isGM && !_se->_pcSpeaker);
 	}
 }
 


Commit: 3ac55f9246c52e998d5e6a15e5fcb526d1c51c2e
    https://github.com/scummvm/scummvm/commit/3ac55f9246c52e998d5e6a15e5fcb526d1c51c2e
Author: athrxx (athrxx at scummvm.org)
Date: 2022-09-07T23:07:58+02:00

Commit Message:
SCUMM: (IMS) - add some checks during init

Make sure GM init is only done with an actual GM setup.
These are mostly the same checks we already do in the
engine, but it still seems better to do this

Changed paths:
    engines/scumm/imuse/imuse.cpp


diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 3f0599d5914..efae39612a8 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -486,13 +486,15 @@ uint32 IMuseInternal::property(int prop, uint32 value) {
 	case IMuse::PROP_GS:
 		_enable_gs = (value > 0);
 
-		// GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
-		if (_midi_native && _enable_gs) {
-			_native_mt32 = true;
-			initGS(_midi_native);
-		} else {
-			// If GS is disabled we do the "normal" init from the original GM drivers.
-			initGM();
+		if (_midi_native) {
+			if (_enable_gs) {
+				// GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
+				_native_mt32 = true;
+				initGS(_midi_native);
+			} else if (!_native_mt32) {
+				// If GS is disabled we do the "normal" init from the original GM drivers.
+				initGM();
+			}
 		}
 		break;
 




More information about the Scummvm-git-logs mailing list