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(); createChannels();
if (_gsMode) if (_gsMode)
initDeviceAsRolandGS(); initRolandGSMode();
else
initDevice(); initDevice();
return res; return res;
} }
@ -520,7 +520,7 @@ void IMuseDriver_GMidi::initDevice() {
} }
} }
void IMuseDriver_GMidi::initDeviceAsRolandGS() { void IMuseDriver_GMidi::initRolandGSMode() {
byte buffer[12]; byte buffer[12];
int i; int i;

View File

@ -66,7 +66,7 @@ protected:
private: private:
virtual void initDevice(); virtual void initDevice();
void initDeviceAsRolandGS(); void initRolandGSMode();
virtual void deinitDevice(); virtual void deinitDevice();
void setNoteFlag(byte chan, byte note) { if (_notesPlaying && chan < 16 && note < 128) _notesPlaying[note] |= (1 << chan); } 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) : 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 _native_mt32(initFlags & kFlagNativeMT32),
_enable_gs(initFlags & kFlagRolandGS),
_newSystem(initFlags & kFlagNewSystem), _newSystem(initFlags & kFlagNewSystem),
_midi_adlib(nullptr), _midi_adlib(nullptr),
_midi_native(nullptr), _midi_native(nullptr),

View File

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

View File

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