AUDIO: replace GUIErrorMessage()
GUIErrorMessage() shouldn't be used since it changes the window caption and resets the graphics mode.
This commit is contained in:
parent
920c3bb172
commit
6d80255cec
1 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue