diff options
author | athrxx | 2011-06-06 00:17:24 +0200 |
---|---|---|
committer | athrxx | 2011-06-06 00:20:05 +0200 |
commit | 8d23f692f2938036eaac7aedab2847bf958cb424 (patch) | |
tree | 9d636f71e7d791296d9219c015424dc27717f9a9 | |
parent | 6d80255cec91e56ba1b52137abc015cdbc9bfc4d (diff) | |
download | scummvm-rg350-8d23f692f2938036eaac7aedab2847bf958cb424.tar.gz scummvm-rg350-8d23f692f2938036eaac7aedab2847bf958cb424.tar.bz2 scummvm-rg350-8d23f692f2938036eaac7aedab2847bf958cb424.zip |
AUDIO: replaced kDriverName in MidiDriver::detectDevice()
(This is irrelevant for the MT-32 emulator, but makes sense for plugins which really have more than one device)
-rw-r--r-- | audio/mididrv.cpp | 8 | ||||
-rw-r--r-- | audio/mididrv.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp index 9f8181aa7b..03cea519f1 100644 --- a/audio/mididrv.cpp +++ b/audio/mididrv.cpp @@ -111,6 +111,8 @@ Common::String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringType return d->getMusicDriverName(); else if (type == kDriverId) return d->getMusicDriverId(); + else if (type == kDeviceName) + return d->getCompleteName(); else if (type == kDeviceId) return d->getCompleteId(); else @@ -199,7 +201,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) { return reslt; } else { // If the expressly selected device is unavailable we display a warning and continue. - failedDevStr = getDeviceString(hdl, MidiDriver::kDriverName); + failedDevStr = getDeviceString(hdl, MidiDriver::kDeviceName); Common::String warningMsg = "Failed to detect the selected audio device '" + failedDevStr +"'. See log file for more information. Attempting to fall back to the next available device..."; GUI::MessageDialog dialog(warningMsg); dialog.runModal(); @@ -239,8 +241,8 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) { // If the preferred (expressly requested) device is unavailable we display a warning and continue. // Don't warn about the missing device if we did already (this becomes relevant if the failing // device is selected as preferred device and also as GM or MT-32 device). - if (failedDevStr != getDeviceString(hdl, MidiDriver::kDriverName)) { - Common::String warningMsg = "Failed to detect the preferred device '" + getDeviceString(hdl, MidiDriver::kDriverName) + "'. See log file for more information. Attempting to fall back to the next available device..."; + if (failedDevStr != getDeviceString(hdl, MidiDriver::kDeviceName)) { + Common::String warningMsg = "Failed to detect the preferred device '" + getDeviceString(hdl, MidiDriver::kDeviceName) + "'. See log file for more information. Attempting to fall back to the next available device..."; GUI::MessageDialog dialog(warningMsg); dialog.runModal(); } diff --git a/audio/mididrv.h b/audio/mididrv.h index 9db23b8d14..e3f6461be9 100644 --- a/audio/mididrv.h +++ b/audio/mididrv.h @@ -142,6 +142,7 @@ public: enum DeviceStringType { kDriverName, kDriverId, + kDeviceName, kDeviceId }; |