diff options
author | athrxx | 2011-06-05 22:04:42 +0200 |
---|---|---|
committer | athrxx | 2011-06-05 22:05:37 +0200 |
commit | 6d80255cec91e56ba1b52137abc015cdbc9bfc4d (patch) | |
tree | e609e3fb36118bc57a6344a02ccb4a90bcef5b09 | |
parent | 920c3bb17236e013b0e135886fa37521ceffd086 (diff) | |
download | scummvm-rg350-6d80255cec91e56ba1b52137abc015cdbc9bfc4d.tar.gz scummvm-rg350-6d80255cec91e56ba1b52137abc015cdbc9bfc4d.tar.bz2 scummvm-rg350-6d80255cec91e56ba1b52137abc015cdbc9bfc4d.zip |
AUDIO: replace GUIErrorMessage()
GUIErrorMessage() shouldn't be used since it changes the window caption and resets the graphics mode.
-rw-r--r-- | audio/mididrv.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp index 0b5066eca0..9f8181aa7b 100644 --- a/audio/mididrv.cpp +++ b/audio/mididrv.cpp @@ -26,7 +26,7 @@ #include "common/system.h" #include "common/textconsole.h" #include "common/util.h" -#include "engines/engine.h" +#include "gui/message.h" #include "audio/mididrv.h" #include "audio/musicplugin.h" @@ -200,8 +200,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) { } else { // If the expressly selected device is unavailable we display a warning and continue. failedDevStr = getDeviceString(hdl, MidiDriver::kDriverName); - Common::String errorMessage = "Failed to detect the selected audio device '" + failedDevStr +"'. See log file for more information. Attempting to fall back to the next available device..."; - GUIErrorMessage(errorMessage); + 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 +240,9 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) { // 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 errorMessage = "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..."; - GUIErrorMessage(errorMessage); + 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..."; + GUI::MessageDialog dialog(warningMsg); + dialog.runModal(); } hdl = MT_AUTO; } |