[Scummvm-cvs-logs] SF.net SVN: scummvm: [27788] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Jun 30 14:43:53 CEST 2007
Revision: 27788
http://scummvm.svn.sourceforge.net/scummvm/?rev=27788&view=rev
Author: fingolfin
Date: 2007-06-30 05:43:53 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
Added global support for the (so far undocumented) confirm_exit config key
Modified Paths:
--------------
scummvm/trunk/README
scummvm/trunk/backends/events/default/default-events.cpp
scummvm/trunk/engines/scumm/input.cpp
Modified: scummvm/trunk/README
===================================================================
--- scummvm/trunk/README 2007-06-30 12:39:12 UTC (rev 27787)
+++ scummvm/trunk/README 2007-06-30 12:43:53 UTC (rev 27788)
@@ -1575,6 +1575,8 @@
super2xsai, supereagle, advmame2x, advmame3x,
hq2x, hq3x, tv2x, dotmatrix)
+ confirm_exit bool Ask for confirmation by the user before quitting
+ (SDL backend only).
cdrom number Number of CD-ROM unit to use for audio. If
negative, don't even try to access the CD-ROM.
joystick_num number Number of joystick device to use for input
@@ -1600,8 +1602,8 @@
midi_gain number The MIDI gain (0-1000) (default: 100) (Only
supported by some MIDI drivers.)
- copy_protection bool Enable copy protection in SCUMM games, when
- ScummVM disables it by default.
+ copy_protection bool Enable copy protection in certain games, in those
+ cases where ScummVM disables it by default.
demo_mode bool Start demo in Maniac Mansion
alt_intro bool Use alternative intro for CD versions of
Beneath a Steel Sky and Flight of the Amazon
Modified: scummvm/trunk/backends/events/default/default-events.cpp
===================================================================
--- scummvm/trunk/backends/events/default/default-events.cpp 2007-06-30 12:39:12 UTC (rev 27787)
+++ scummvm/trunk/backends/events/default/default-events.cpp 2007-06-30 12:43:53 UTC (rev 27788)
@@ -26,8 +26,10 @@
#if !defined(DISABLE_DEFAULT_EVENTMANAGER)
#include "common/stdafx.h"
+#include "common/config-manager.h"
#include "common/system.h"
#include "backends/events/default/default-events.h"
+#include "gui/message.h"
DefaultEventManager::DefaultEventManager(OSystem *boss) :
_boss(boss),
@@ -93,7 +95,15 @@
break;
case Common::EVENT_QUIT:
- _shouldQuit = true;
+ if (ConfMan.getBool("confirm_exit")) {
+ GUI::MessageDialog alert("Do you really want to quit?", "Yes", "No");
+ if (alert.runModal() == GUI::kMessageOK)
+ _shouldQuit = true;
+ else
+ result = false;
+
+ } else
+ _shouldQuit = true;
break;
default:
Modified: scummvm/trunk/engines/scumm/input.cpp
===================================================================
--- scummvm/trunk/engines/scumm/input.cpp 2007-06-30 12:39:12 UTC (rev 27787)
+++ scummvm/trunk/engines/scumm/input.cpp 2007-06-30 12:43:53 UTC (rev 27788)
@@ -188,10 +188,7 @@
break;
case Common::EVENT_QUIT:
- if (ConfMan.getBool("confirm_exit"))
- confirmExitDialog();
- else
- _quit = true;
+ _quit = true;
break;
default:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list