diff options
-rw-r--r-- | backends/platform/wince/CEActionsPocket.cpp | 8 | ||||
-rw-r--r-- | backends/platform/wince/CEActionsSmartphone.cpp | 8 |
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; |