summaryrefslogtreecommitdiff
path: root/apps/plugins/brickmania.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/brickmania.c')
-rw-r--r--apps/plugins/brickmania.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index bae8ded..f0059ba 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -165,18 +165,30 @@ PLUGIN_HEADER
#define RC_QUIT BUTTON_REC
#elif CONFIG_KEYPAD == COWOND2_PAD
-
-#define QUIT BUTTON_POWER
-#define LEFT BUTTON_LEFT
-#define RIGHT BUTTON_RIGHT
-#define SELECT BUTTON_SELECT
-#define UP BUTTON_UP
-#define DOWN BUTTON_DOWN
+#define QUIT BUTTON_POWER
#else
#error No keymap defined!
#endif
+#ifdef HAVE_TOUCHPAD
+#ifndef LEFT
+#define LEFT BUTTON_MIDLEFT
+#endif
+#ifndef RIGHT
+#define RIGHT BUTTON_MIDRIGHT
+#endif
+#ifndef SELECT
+#define SELECT BUTTON_CENTER
+#endif
+#ifndef UP
+#define UP BUTTON_TOPMIDDLE
+#endif
+#ifndef DOWN
+#define DOWN BUTTON_BOTTOMMIDDLE
+#endif
+#endif
+
#ifndef SCROLL_FWD /* targets without scroll wheel*/
#define SCROLL_FWD(x) (0)
#define SCROLL_BACK(x) (0)