SCI: Added a warning for SCI0 games like in bug #3297881

LB1 Amiga doesn't contain MT-32 music tracks. Added a warning for this
situation
This commit is contained in:
md5 2011-05-12 04:34:20 +03:00
parent 69b1485a22
commit 3b75ff9132

View File

@ -221,6 +221,7 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
byte command = 0, lastCommand = 0;
int delta = 0;
int midiParamCount = 0;
bool containsMidiData = false;
_mixedData = outData;
@ -247,6 +248,9 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
}
}
if ((1 << curChannel) & channelMask) {
if (curChannel != 0xF)
containsMidiData = true;
if (command != kEndOfTrack) {
// Write delta
while (delta > 240) {
@ -304,6 +308,11 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
*outData++ = 0x00;
*outData++ = 0x00;
// This occurs in the music tracks of LB1 Amiga, when using the MT-32
// driver (bug #3297881)
if (!containsMidiData)
warning("MIDI parser: the requested SCI0 sound has no MIDI note data for the currently selected sound driver");
return _mixedData;
}