Output a warning to the user, when he tries to play back MT32 MIDI tracks with a General MIDI device.

svn-id: r41012
This commit is contained in:
Johannes Schickel 2009-05-29 17:38:22 +00:00
parent 51fc019a9b
commit 874e340d25

View File

@ -29,6 +29,8 @@
#include "common/system.h"
#include "common/config-manager.h"
#include "gui/message.h"
namespace Kyra {
class MidiOutput : public MidiDriver {
@ -467,6 +469,19 @@ SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *dri
// file extension.
if (_vm->game() == GI_KYRA1 && _type == kMidiGM)
_type = kMidiMT32;
// Display a warning about possibly wrong sound when the user only has
// a General MIDI device, but the game is setup to use Roland MT32 MIDI.
// (This will only happen in The Legend of Kyrandia 1 though, all other
// supported games include special General MIDI tracks).
if (_type == kMidiMT32 && !_nativeMT32) {
::GUI::MessageDialog dialog("You appear to be using a General MIDI device,\n"
"but your game only supports Roland MT32 MIDI.\n"
"We try to map the Roland MT32 instruments to\n"
"General MIDI ones. After all it might happen\n"
"that a few tracks will not be correctly played.");
dialog.runModal();
}
}
SoundMidiPC::~SoundMidiPC() {