summaryrefslogtreecommitdiffstats
path: root/apps/plugins/invadrox.c
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2009-12-12 11:16:13 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2009-12-12 11:16:13 +0000
commitca6dfdc3fe49e0718e5380920e6696fc98ba2760 (patch)
tree19a81f102469da613d65360a732f711eb9841ea3 /apps/plugins/invadrox.c
parent8565dc217c2d17d1ec7ba4f6fc7259808de10a94 (diff)
downloadrockbox-ca6dfdc3fe49e0718e5380920e6696fc98ba2760.tar.gz
rockbox-ca6dfdc3fe49e0718e5380920e6696fc98ba2760.tar.bz2
rockbox-ca6dfdc3fe49e0718e5380920e6696fc98ba2760.zip
Invadrox: Fix red caused by touchscreen targets with no buttons defined for movements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23943 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/invadrox.c')
-rw-r--r--apps/plugins/invadrox.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 9aa8efeecb..940c60ffa3 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -199,29 +199,38 @@ CONFIG_KEYPAD == MROBE500_PAD
#error INVADROX: Unsupported keypad
#endif
+#ifndef RC_QUIT
+#define RC_QUIT 0
+#endif
+
#ifdef HAVE_TOUCHSCREEN
+#ifndef QUIT
+#define QUIT 0
+#endif
+#ifndef LEFT
+#define LEFT 0
+#endif
+#ifndef RIGHT
+#define RIGHT 0
+#endif
+#ifndef FIRE
+#define FIRE 0
+#endif
+
#define TOUCHSCREEN_QUIT BUTTON_TOPLEFT
#define TOUCHSCREEN_LEFT (BUTTON_MIDLEFT | BUTTON_BOTTOMLEFT)
#define TOUCHSCREEN_RIGHT (BUTTON_MIDRIGHT | BUTTON_BOTTOMRIGHT)
#define TOUCHSCREEN_FIRE (BUTTON_CENTER | BUTTON_BOTTOMMIDDLE)
-#ifdef RC_QUIT
#define ACTION_QUIT (QUIT | TOUCHSCREEN_QUIT | RC_QUIT)
-#else
-#define ACTION_QUIT (QUIT | TOUCHSCREEN_QUIT)
-#endif
#define ACTION_LEFT (LEFT | TOUCHSCREEN_LEFT)
#define ACTION_RIGHT (RIGHT | TOUCHSCREEN_RIGHT)
#define ACTION_FIRE (FIRE | TOUCHSCREEN_FIRE)
-#else
+#else /* HAVE_TOUCHSCREEN */
-#ifdef RC_QUIT
#define ACTION_QUIT (QUIT | RC_QUIT)
-#else
-#define ACTION_QUIT QUIT
-#endif
#define ACTION_LEFT LEFT
#define ACTION_RIGHT RIGHT
#define ACTION_FIRE FIRE