aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorEugene Sandulenko2009-08-23 20:40:09 +0000
committerEugene Sandulenko2009-08-23 20:40:09 +0000
commit080eaef76cb4051802a41c58155f7bb004ab9d1a (patch)
tree3986d82a2973f8dbee7b6431f2c1423df4542433 /backends
parentcf7116710bd2703e91ebc517274f7038c68fce5b (diff)
downloadscummvm-rg350-080eaef76cb4051802a41c58155f7bb004ab9d1a.tar.gz
scummvm-rg350-080eaef76cb4051802a41c58155f7bb004ab9d1a.tar.bz2
scummvm-rg350-080eaef76cb4051802a41c58155f7bb004ab9d1a.zip
Formatting
svn-id: r43675
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/linuxmoto/hardwarekeys.cpp34
-rw-r--r--backends/platform/linuxmoto/linuxmoto-events.cpp48
2 files changed, 42 insertions, 40 deletions
diff --git a/backends/platform/linuxmoto/hardwarekeys.cpp b/backends/platform/linuxmoto/hardwarekeys.cpp
index 2f64e7dbae..e65d2bec2b 100644
--- a/backends/platform/linuxmoto/hardwarekeys.cpp
+++ b/backends/platform/linuxmoto/hardwarekeys.cpp
@@ -42,23 +42,23 @@ struct Key {
};
static const Key keys[] = {
- {"FIRE", KEYCODE_RETURN, ASCII_RETURN, "Fire", kActionKeyType, false},
- {"CAMERA", KEYCODE_PAUSE, 0, "Camera", kActionKeyType, false},
- {"HANGUP", KEYCODE_ESCAPE, ASCII_ESCAPE, "Hangup", kStartKeyType, false},
- {"CALL", KEYCODE_SPACE, ASCII_SPACE, "Call", kActionKeyType, false},
- {"PLUS", KEYCODE_PLUS, '+', "+", kActionKeyType, false},
- {"MINUS", KEYCODE_MINUS, '-', "-", kActionKeyType, false},
-
- {"a", KEYCODE_a, 'a', "a", kActionKeyType, true},
- {"b", KEYCODE_b, 'b', "b", kActionKeyType, true},
- {"c", KEYCODE_c, 'c', "c", kActionKeyType, true},
- {"d", KEYCODE_d, 'd', "d", kActionKeyType, true},
- {"e", KEYCODE_e, 'e', "e", kActionKeyType, true},
- {"f", KEYCODE_f, 'f', "f", kActionKeyType, true},
- {"g", KEYCODE_g, 'g', "g", kActionKeyType, true},
- {"h", KEYCODE_h, 'h', "h", kActionKeyType, true},
- {"i", KEYCODE_i, 'i', "i", kActionKeyType, true},
- {"j", KEYCODE_j, 'j', "j", kActionKeyType, true},
+ { "FIRE", KEYCODE_RETURN, ASCII_RETURN, "Fire", kActionKeyType, false },
+ { "CAMERA", KEYCODE_PAUSE, 0, "Camera", kActionKeyType, false },
+ { "HANGUP", KEYCODE_ESCAPE, ASCII_ESCAPE, "Hangup", kStartKeyType, false },
+ { "CALL", KEYCODE_SPACE, ASCII_SPACE, "Call", kActionKeyType, false },
+ { "PLUS", KEYCODE_PLUS, '+', "+", kActionKeyType, false },
+ { "MINUS", KEYCODE_MINUS, '-', "-", kActionKeyType, false },
+
+ { "a", KEYCODE_a, 'a', "a", kActionKeyType, true },
+ { "b", KEYCODE_b, 'b', "b", kActionKeyType, true },
+ { "c", KEYCODE_c, 'c', "c", kActionKeyType, true },
+ { "d", KEYCODE_d, 'd', "d", kActionKeyType, true },
+ { "e", KEYCODE_e, 'e', "e", kActionKeyType, true },
+ { "f", KEYCODE_f, 'f', "f", kActionKeyType, true },
+ { "g", KEYCODE_g, 'g', "g", kActionKeyType, true },
+ { "h", KEYCODE_h, 'h', "h", kActionKeyType, true },
+ { "i", KEYCODE_i, 'i', "i", kActionKeyType, true },
+ { "j", KEYCODE_j, 'j', "j", kActionKeyType, true },
// Numeric keypad
diff --git a/backends/platform/linuxmoto/linuxmoto-events.cpp b/backends/platform/linuxmoto/linuxmoto-events.cpp
index 2a40d734b0..be5eec5c7e 100644
--- a/backends/platform/linuxmoto/linuxmoto-events.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-events.cpp
@@ -53,20 +53,20 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
return true;
}
// '1' Bypass security protection - MOD+Call key
- if (ev.key.keysym.sym == SDLK_f) {
- ev.key.keysym.sym=SDLK_1;
+ if (ev.key.keysym.sym == SDLK_f) {
+ ev.key.keysym.sym = SDLK_1;
}
// F5 Game Menu - Call key
else if (ev.key.keysym.sym == SDLK_SPACE) {
- ev.key.keysym.sym=SDLK_F5;
+ ev.key.keysym.sym = SDLK_F5;
}
// Camera to VirtualKeyboard
else if (ev.key.keysym.sym == SDLK_PAUSE) {
- ev.key.keysym.sym=SDLK_F7;
+ ev.key.keysym.sym = SDLK_F7;
}
// mod+fire to enter
else if (ev.key.keysym.sym == SDLK_b) {
- ev.key.keysym.sym=SDLK_RETURN;
+ ev.key.keysym.sym = SDLK_RETURN;
}
#endif
// Motorola Z6/V8 remapkey by Ant-On
@@ -78,17 +78,17 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
} else
// F5 Game Menu - Call key
if (ev.key.keysym.sym == SDLK_SPACE) {
- ev.key.keysym.sym=SDLK_F5;
+ ev.key.keysym.sym = SDLK_F5;
}
// 'y' - Mod+Right key
// 'y' - Left soft
else if (ev.key.keysym.sym == SDLK_F9) {
- ev.key.keysym.sym=SDLK_y;
+ ev.key.keysym.sym = SDLK_y;
}
// 'n' - Mod+Left key
// 'n' - rigth soft
else if (ev.key.keysym.sym == SDLK_F11) {
- ev.key.keysym.sym=SDLK_n;
+ ev.key.keysym.sym = SDLK_n;
}
#endif
@@ -116,6 +116,7 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
+
return true;
} else if (ev.key.keysym.sym == SDLK_DOWN) {
if (ev.type == SDL_KEYDOWN) {
@@ -128,6 +129,7 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
+
return true;
} else if (ev.key.keysym.sym == SDLK_UP) {
if (ev.type == SDL_KEYDOWN) {
@@ -140,47 +142,47 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
+
return true;
- }
- // Joystick center to pressing Left Mouse
- else if (ev.key.keysym.sym == SDLK_RETURN) {
+ } else if (ev.key.keysym.sym == SDLK_RETURN) { // Joystick center to pressing Left Mouse
// _km.y_vel = 0;
// _km.y_down_count = 0;
if (ev.key.type == SDL_KEYDOWN) {
event.type = Common::EVENT_LBUTTONDOWN;
} else {
- event.type = Common::EVENT_LBUTTONUP;
+ event.type = Common::EVENT_LBUTTONUP;
}
+
fillMouseEvent(event, _km.x, _km.y);
+
return true;
- }
- // Volume Up to pressing Right Mouse
- else if (ev.key.keysym.sym == SDLK_PLUS) {
+ } else if (ev.key.keysym.sym == SDLK_PLUS) { // Volume Up to pressing Right Mouse
// _km.y_vel = 0;
// _km.y_down_count = 0;
if (ev.key.type == SDL_KEYDOWN ) {
event.type = Common::EVENT_RBUTTONDOWN;
} else {
- event.type = Common::EVENT_RBUTTONUP;
+ event.type = Common::EVENT_RBUTTONUP;
}
fillMouseEvent(event, _km.x, _km.y);
+
return true;
- }
- // Volume Down to pressing Left Mouse
- else if (ev.key.keysym.sym == SDLK_MINUS) {
+ } else if (ev.key.keysym.sym == SDLK_MINUS) { // Volume Down to pressing Left Mouse
//_km.y_vel = 0;
//_km.y_down_count = 0;
if (ev.key.type == SDL_KEYDOWN) {
event.type = Common::EVENT_LBUTTONDOWN;
} else {
- event.type = Common::EVENT_LBUTTONUP;
+ event.type = Common::EVENT_LBUTTONUP;
}
+
fillMouseEvent(event, _km.x, _km.y);
+
return true;
} else {
- // Let the events fall through if we didn't change them, this may not be the best way to
- // set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though.
- // and yes i have an huge terminal size so i dont wrap soon enough.
+ // Let the events fall through if we didn't change them, this may not be the best way to
+ // set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though.
+ // and yes i have an huge terminal size so i dont wrap soon enough.
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);