From 1f56326bd53f2762b353449a534a0912250b5e17 Mon Sep 17 00:00:00 2001 From: Jerome Fisher Date: Sun, 28 Nov 2004 22:23:13 +0000 Subject: - Now sets the palette earlier, and only once. svn-id: r15948 --- backends/midi/mt32.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'backends/midi') diff --git a/backends/midi/mt32.cpp b/backends/midi/mt32.cpp index 18bddf25f5..26b32614dc 100644 --- a/backends/midi/mt32.cpp +++ b/backends/midi/mt32.cpp @@ -192,16 +192,6 @@ static int MT32_Report(void *userData, MT32Emu::ReportType type, const void *rep break; case MT32Emu::ReportType_progressInit: if (((MidiDriver_MT32 *)userData)->_initialising) { - const byte dummy_palette[] = { - 0, 0, 0, 0, - 0, 0, 171, 0, - 0, 171, 0, 0, - 0, 171, 171, 0, - 171, 0, 0, 0 - }; - - g_system->setPalette(dummy_palette, 0, 5); - drawProgress(*((const float *)reportData)); return eatSystemEvents(); } @@ -262,6 +252,15 @@ int MidiDriver_MT32::open() { prop.openFile = MT32_OpenFile; _synth = new MT32Emu::Synth(); _initialising = true; + const byte dummy_palette[] = { + 0, 0, 0, 0, + 0, 0, 171, 0, + 0, 171, 0, 0, + 0, 171, 171, 0, + 171, 0, 0, 0 + }; + + g_system->setPalette(dummy_palette, 0, 5); drawMessage(-1, "Initialising MT-32 Emulator"); if (!_synth->open(prop)) return MERR_DEVICE_NOT_AVAILABLE; -- cgit v1.2.3