From d08192cb04e391b9b148a4bc3921c546476339eb Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 11 Nov 2008 12:28:46 +0000 Subject: If confirm_exit is set, also ask the user if he really wants to return to the launcher (after all, as with quit, all data is lost) svn-id: r35003 --- backends/events/default/default-events.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'backends/events/default') diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp index 739987d64c..80c1b872c7 100644 --- a/backends/events/default/default-events.cpp +++ b/backends/events/default/default-events.cpp @@ -469,14 +469,22 @@ bool DefaultEventManager::pollEvent(Common::Event &event) { break; case Common::EVENT_RTL: - _shouldRTL = true; + if (ConfMan.getBool("confirm_exit")) { + if (g_engine) + g_engine->pauseEngine(true); + GUI::MessageDialog alert("Do you really want to return to the Launcher?", "Launcher", "Cancel"); + result = _shouldRTL = (alert.runModal() == GUI::kMessageOK); + if (g_engine) + g_engine->pauseEngine(false); + } else + _shouldRTL = true; break; case Common::EVENT_QUIT: if (ConfMan.getBool("confirm_exit")) { if (g_engine) g_engine->pauseEngine(true); - GUI::MessageDialog alert("Do you really want to quit?", "Yes", "No"); + GUI::MessageDialog alert("Do you really want to quit?", "Quit", "Cancel"); result = _shouldQuit = (alert.runModal() == GUI::kMessageOK); if (g_engine) g_engine->pauseEngine(false); -- cgit v1.2.3