summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2008-04-27 15:30:19 +0000
committerRob Purchase <shotofadds@rockbox.org>2008-04-27 15:30:19 +0000
commit297e0504dad929f8990a654c4bc7a3e891ff41cb (patch)
tree7def4b8fba3c184f82415e840e9c32780848970b /apps/plugins/mpegplayer
parent6b9b508aab29a406015e93c4808d87591173a083 (diff)
FS#8708: D2/m:robe500 touchscreen keymaps by Andreas Mueller.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17261 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c34
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c31
2 files changed, 53 insertions, 12 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index b7b7def729..4d9e5625f9 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -111,19 +111,39 @@ struct mpeg_settings settings;
#define MPEG_START_TIME_EXIT BUTTON_RC_REC
#elif CONFIG_KEYPAD == COWOND2_PAD
-#define MPEG_START_TIME_SELECT BUTTON_SELECT
-#define MPEG_START_TIME_SCROLL_UP BUTTON_PLUS
-#define MPEG_START_TIME_SCROLL_DOWN BUTTON_MINUS
-#define MPEG_START_TIME_LEFT BUTTON_LEFT
-#define MPEG_START_TIME_RIGHT BUTTON_RIGHT
-#define MPEG_START_TIME_UP BUTTON_UP
-#define MPEG_START_TIME_DOWN BUTTON_DOWN
#define MPEG_START_TIME_EXIT BUTTON_POWER
#else
#error No keymap defined!
#endif
+#ifdef HAVE_TOUCHPAD
+#ifndef MPEG_START_TIME_SELECT
+#define MPEG_START_TIME_SELECT BUTTON_CENTER
+#endif
+#ifndef MPEG_START_TIME_SCROLL_UP
+#define MPEG_START_TIME_SCROLL_UP BUTTON_TOPRIGHT
+#endif
+#ifndef MPEG_START_TIME_SCROLL_DOWN
+#define MPEG_START_TIME_SCROLL_DOWN BUTTON_TOPLEFT
+#endif
+#ifndef MPEG_START_TIME_LEFT
+#define MPEG_START_TIME_LEFT BUTTON_MIDLEFT
+#endif
+#ifndef MPEG_START_TIME_RIGHT
+#define MPEG_START_TIME_RIGHT BUTTON_MIDRIGHT
+#endif
+#ifndef MPEG_START_TIME_UP
+#define MPEG_START_TIME_UP BUTTON_TOPMIDDLE
+#endif
+#ifndef MPEG_START_TIME_DOWN
+#define MPEG_START_TIME_DOWN BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef MPEG_START_TIME_EXIT
+#define MPEG_START_TIME_EXIT BUTTON_TOPLEFT
+#endif
+#endif
+
static struct configdata config[] =
{
{TYPE_INT, 0, 2, &settings.showfps, "Show FPS", NULL, NULL},
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 8a947904a3..e63246b648 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -212,18 +212,39 @@ PLUGIN_IRAM_DECLARE
#define MPEG_FF BUTTON_RC_FF
#elif CONFIG_KEYPAD == COWOND2_PAD
-#define MPEG_MENU BUTTON_MENU
-#define MPEG_STOP BUTTON_POWER
-#define MPEG_PAUSE BUTTON_SELECT
+#define MPEG_MENU (BUTTON_MENU|BUTTON_REL)
+//#define MPEG_STOP BUTTON_POWER
#define MPEG_VOLDOWN BUTTON_MINUS
#define MPEG_VOLUP BUTTON_PLUS
-#define MPEG_RW BUTTON_LEFT
-#define MPEG_FF BUTTON_RIGHT
#else
#error No keymap defined!
#endif
+#ifdef HAVE_TOUCHPAD
+#ifndef MPEG_MENU
+#define MPEG_MENU (BUTTON_TOPRIGHT|BUTTON_REL)
+#endif
+#ifndef MPEG_STOP
+#define MPEG_STOP BUTTON_TOPLEFT
+#endif
+#ifndef MPEG_PAUSE
+#define MPEG_PAUSE BUTTON_CENTER
+#endif
+#ifndef MPEG_VOLDOWN
+#define MPEG_VOLDOWN BUTTON_TOPMIDDLE
+#endif
+#ifndef MPEG_VOLUP
+#define MPEG_VOLUP BUTTON_BOTTOMMIDDLE
+#endif
+#ifndef MPEG_RW
+#define MPEG_RW BUTTON_MIDLEFT
+#endif
+#ifndef MPEG_FF
+#define MPEG_FF BUTTON_MIDRIGHT
+#endif
+#endif
+
struct plugin_api* rb;
CACHE_FUNCTION_WRAPPERS(rb);