AUDIO: replace GUIErrorMessage()

GUIErrorMessage() shouldn't be used since it changes the window caption and resets the graphics mode.
This commit is contained in:
athrxx 2011-06-05 22:04:42 +02:00
parent 920c3bb172
commit 6d80255cec

View file

@ -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;
}