aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorKostas Nakos2008-08-13 19:32:25 +0000
committerKostas Nakos2008-08-13 19:32:25 +0000
commit56c9e3ab04825845c6f6fd9af9f740a5a715c51a (patch)
treed44ad655d224f92d0f52c667f842f71c82f5f24c /backends/platform
parent5a54dc61a43a7f911a2ef230da9258e3b41fd691 (diff)
downloadscummvm-rg350-56c9e3ab04825845c6f6fd9af9f740a5a715c51a.tar.gz
scummvm-rg350-56c9e3ab04825845c6f6fd9af9f740a5a715c51a.tar.bz2
scummvm-rg350-56c9e3ab04825845c6f6fd9af9f740a5a715c51a.zip
fix a small bug in the quit dialog
svn-id: r33844
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp8
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp8
2 files changed, 10 insertions, 6 deletions
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index 95047ecf5c..3626c4c10b 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -215,7 +215,7 @@ CEActionsPocket::~CEActionsPocket() {
}
bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
- static bool keydialogrunning = false;
+ static bool keydialogrunning = false, quitdialog = false;
if (!pushed) {
switch(action) {
@@ -292,12 +292,14 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
_CESystem->move_cursor_right();
return true;
case POCKET_ACTION_QUIT:
- {
+ if (!quitdialog) {
+ quitdialog = true;
GUI::MessageDialog alert(" Are you sure you want to quit ? ", "Yes", "No");
if (alert.runModal() == GUI::kMessageOK)
_mainSystem->quit();
- return true;
+ quitdialog = false;
}
+ return true;
case POCKET_ACTION_BINDKEYS:
if (!keydialogrunning) {
keydialogrunning = true;
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index dbcddac98c..87f73f5a66 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -179,7 +179,7 @@ CEActionsSmartphone::~CEActionsSmartphone() {
}
bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
- static bool keydialogrunning = false;
+ static bool keydialogrunning = false, quitdialog = false;
if (!pushed) {
switch (action) {
@@ -250,12 +250,14 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
_CESystem->smartphone_rotate_display();
return true;
case SMARTPHONE_ACTION_QUIT:
- {
+ if (!quitdialog) {
+ quitdialog = true;
GUI::MessageDialog alert(" Are you sure you want to quit ? ", "Yes", "No");
if (alert.runModal() == GUI::kMessageOK)
_mainSystem->quit();
- return true;
+ quitdialog = false;
}
+ return true;
}
return false;