aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2004-11-06 02:20:43 +0000
committerEugene Sandulenko2004-11-06 02:20:43 +0000
commitdee673d96e7c18b53745553f18acd1a6b5ac6282 (patch)
tree715a814cc9eb5d87dbfa1b864b3571cf328aff46
parent805b21181ab7138da6960ade703b25716120fc29 (diff)
downloadscummvm-rg350-dee673d96e7c18b53745553f18acd1a6b5ac6282.tar.gz
scummvm-rg350-dee673d96e7c18b53745553f18acd1a6b5ac6282.tar.bz2
scummvm-rg350-dee673d96e7c18b53745553f18acd1a6b5ac6282.zip
Improve reporting (OSD messages, file open errors) and fix typos.
Forgot to mention: o waveforms.raw is autogenerated if not present svn-id: r15716
-rw-r--r--backends/midi/mt32.cpp26
-rw-r--r--backends/midi/mt32/synth.h4
2 files changed, 27 insertions, 3 deletions
diff --git a/backends/midi/mt32.cpp b/backends/midi/mt32.cpp
index 2931e94c71..d954952d89 100644
--- a/backends/midi/mt32.cpp
+++ b/backends/midi/mt32.cpp
@@ -118,7 +118,30 @@ MT32Emu::File *MT32_OpenFile(void *userData, const char *filename, MT32Emu::File
//
////////////////////////////////////////
-void report(int type, ...) {}
+static void report(void *userData, MT32Emu::ReportType type, void *reportData) {
+ switch(type) {
+ case MT32Emu::ReportType_lcdMessage:
+ g_system->displayMessageOnOSD((char *)reportData);
+ break;
+ case MT32Emu::ReportType_errorPreset1:
+ error("Couldn't open Preset1.syx file");
+ break;
+ case MT32Emu::ReportType_errorPreset2:
+ error("Couldn't open Preset2.syx file");
+ break;
+ case MT32Emu::ReportType_errorDrumpat:
+ error("Couldn't open drumpat.rom file");
+ break;
+ case MT32Emu::ReportType_errorPatchlog:
+ error("Couldn't open patchlog.cfg file");
+ break;
+ case MT32Emu::ReportType_errorMT32ROM:
+ error("Couldn't open MT32_PCM.ROM file");
+ break;
+ default:
+ break;
+ }
+}
MidiDriver_MT32::MidiDriver_MT32(SoundMixer *mixer) : MidiDriver_Emulated(mixer) {
_channel_mask = 0xFFFF; // Permit all 16 channels by default
@@ -159,6 +182,7 @@ int MidiDriver_MT32::open() {
prop.RevLevel = 3;
prop.userData = (void *)1;
prop.printDebug = &vdebug;
+ prop.report = &report;
prop.openFile = MT32_OpenFile;
_synth = new MT32Emu::Synth();
if (!_synth->open(prop))
diff --git a/backends/midi/mt32/synth.h b/backends/midi/mt32/synth.h
index e181c4d763..8d3305e0d4 100644
--- a/backends/midi/mt32/synth.h
+++ b/backends/midi/mt32/synth.h
@@ -52,8 +52,8 @@ enum ReportType {
// HW spec
ReportType_availableSSE = 6,
ReportType_available3DNow = 7,
- ReportType_asingSSE = 8,
- ReportType_asing3DNow = 9,
+ ReportType_usingSSE = 8,
+ ReportType_using3DNow = 9,
// General info
ReportType_lcdMessage = 10,