[Scummvm-cvs-logs] scummvm master -> 6d80255cec91e56ba1b52137abc015cdbc9bfc4d

athrxx athrxx at scummvm.org
Sun Jun 5 22:09:20 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6d80255cec AUDIO: replace GUIErrorMessage()


Commit: 6d80255cec91e56ba1b52137abc015cdbc9bfc4d
    https://github.com/scummvm/scummvm/commit/6d80255cec91e56ba1b52137abc015cdbc9bfc4d
Author: athrxx (athrxx at scummvm.org)
Date: 2011-06-05T13:05:37-07:00

Commit Message:
AUDIO: replace GUIErrorMessage()

GUIErrorMessage() shouldn't be used since it changes the window caption and resets the graphics mode.

Changed paths:
    audio/mididrv.cpp



diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 0b5066e..9f8181a 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;
 					}






More information about the Scummvm-git-logs mailing list