SCUMM: (IMS/Midi) - fix gs setting

(the device shouldn't pretend to be an MT-32,
otherwise the engine will send sysex instruments
instead of doing normal program changes)
This commit is contained in:
athrxx 2024-03-16 15:50:53 +01:00
parent 9c90080474
commit 793d073744
5 changed files with 7 additions and 10 deletions

View File

@ -401,9 +401,9 @@ int IMuseDriver_GMidi::open() {
createChannels();
if (_gsMode)
initDeviceAsRolandGS();
else
initDevice();
initRolandGSMode();
initDevice();
return res;
}
@ -520,7 +520,7 @@ void IMuseDriver_GMidi::initDevice() {
}
}
void IMuseDriver_GMidi::initDeviceAsRolandGS() {
void IMuseDriver_GMidi::initRolandGSMode() {
byte buffer[12];
int i;

View File

@ -66,7 +66,7 @@ protected:
private:
virtual void initDevice();
void initDeviceAsRolandGS();
void initRolandGSMode();
virtual void deinitDevice();
void setNoteFlag(byte chan, byte note) { if (_notesPlaying && chan < 16 && note < 128) _notesPlaying[note] |= (1 << chan); }

View File

@ -44,8 +44,7 @@ namespace Scumm {
////////////////////////////////////////
IMuseInternal::IMuseInternal(ScummEngine *vm, MidiDriverFlags sndType, uint32 initFlags) :
_native_mt32((initFlags & kFlagNativeMT32) || (initFlags & kFlagRolandGS)), // GS Mode emulates MT-32 on a GS device, so _native_mt32 should always be true
_enable_gs(initFlags & kFlagRolandGS),
_native_mt32(initFlags & kFlagNativeMT32),
_newSystem(initFlags & kFlagNewSystem),
_midi_adlib(nullptr),
_midi_native(nullptr),

View File

@ -57,8 +57,7 @@ public:
enum {
kFlagNewSystem = 1 << 0,
kFlagNativeMT32 = 1 << 1,
kFlagRolandGS = 1 << 2
kFlagNativeMT32 = 1 << 1
};
public:

View File

@ -417,7 +417,6 @@ class IMuseInternal : public IMuse {
protected:
const bool _native_mt32;
const bool _enable_gs;
const bool _newSystem;
const MidiDriverFlags _soundType;
MidiDriver *_midi_adlib;