From 6d80255cec91e56ba1b52137abc015cdbc9bfc4d Mon Sep 17 00:00:00 2001 From: athrxx Date: Sun, 5 Jun 2011 22:04:42 +0200 Subject: AUDIO: replace GUIErrorMessage() GUIErrorMessage() shouldn't be used since it changes the window caption and resets the graphics mode. --- audio/mididrv.cpp | 12 +++++++----- 1 file 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; } -- cgit v1.2.3