aboutsummaryrefslogtreecommitdiff
path: root/backends/wince/CEActionsSmartphone.cpp
diff options
context:
space:
mode:
authorNicolas Bacca2006-01-29 23:23:17 +0000
committerNicolas Bacca2006-01-29 23:23:17 +0000
commitaad356f5f598e4e1f475d065377f931e7a5938e2 (patch)
treed30b8c017d3e0fdf39757814081585d1b67016ad /backends/wince/CEActionsSmartphone.cpp
parent29a1aebe6aaef6cb4dccb834572784e01b637bbb (diff)
downloadscummvm-rg350-aad356f5f598e4e1f475d065377f931e7a5938e2.tar.gz
scummvm-rg350-aad356f5f598e4e1f475d065377f931e7a5938e2.tar.bz2
scummvm-rg350-aad356f5f598e4e1f475d065377f931e7a5938e2.zip
Knakos patch & Smartphone fixes
svn-id: r20305
Diffstat (limited to 'backends/wince/CEActionsSmartphone.cpp')
-rw-r--r--backends/wince/CEActionsSmartphone.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/backends/wince/CEActionsSmartphone.cpp b/backends/wince/CEActionsSmartphone.cpp
index b5802915b3..553afea71d 100644
--- a/backends/wince/CEActionsSmartphone.cpp
+++ b/backends/wince/CEActionsSmartphone.cpp
@@ -33,6 +33,8 @@
#include "common/config-manager.h"
+#include "gui/KeysDialog.h"
+
#ifdef _WIN32_WCE
#define KEY_ALL_SKIP 3457
#endif
@@ -47,13 +49,14 @@ const String smartphoneActionNames[] = {
"Save",
"Skip",
"Zone",
- "FT Cheat"
+ "FT Cheat",
+ "Bind Keys"
};
#ifdef SIMU_SMARTPHONE
-const int ACTIONS_SMARTPHONE_DEFAULT[] = { 0x111, 0x112, 0x114, 0x113, 0x11a, 0x11b, VK_LWIN, VK_ESCAPE, VK_F8, 0 };
+const int ACTIONS_SMARTPHONE_DEFAULT[] = { 0x111, 0x112, 0x114, 0x113, 0x11a, 0x11b, VK_LWIN, VK_ESCAPE, VK_F8, 0, VK_RETURN };
#else
-const int ACTIONS_SMARTPHONE_DEFAULT[] = { '4', '6', '8', '2', 0x11a, 0x11b, '0', VK_ESCAPE, '9', 0 };
+const int ACTIONS_SMARTPHONE_DEFAULT[] = { '4', '6', '8', '2', 0x11a, 0x11b, '0', VK_ESCAPE, '9', 0, VK_RETURN };
#endif
void CEActionsSmartphone::init(GameDetector &detector) {
@@ -150,6 +153,8 @@ void CEActionsSmartphone::initInstanceGame() {
// FT Cheat
_action_enabled[SMARTPHONE_ACTION_FT_CHEAT] = true;
_key_action[SMARTPHONE_ACTION_FT_CHEAT].setAscii(86); // shift-V
+ // Bind keys
+ _action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
}
@@ -157,6 +162,8 @@ CEActionsSmartphone::~CEActionsSmartphone() {
}
bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
+ static bool keydialogrunning = false;
+
if (!pushed) {
switch (action) {
case SMARTPHONE_ACTION_RIGHTCLICK:
@@ -201,6 +208,15 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
case SMARTPHONE_ACTION_ZONE:
_CESystem->switch_zone();
return true;
+ case SMARTPHONE_ACTION_BINDKEYS:
+ if (!keydialogrunning) {
+ keydialogrunning = true;
+ GUI::KeysDialog *keysDialog = new GUI::KeysDialog();
+ keysDialog->runModal();
+ delete keysDialog;
+ keydialogrunning = false;
+ }
+ return true;
}
return false;