summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2005-06-02 11:50:05 +0000
committerJonas Häggqvist <rasher@rasher.dk>2005-06-02 11:50:05 +0000
commite2c93176f24c77c3f08c3d075a3a2066070d1689 (patch)
tree8cc83e57e9efa2a92a11ab2a314c5ba9155635e2
parent35745919c42553535ccf32ad85d39dea12d92cd7 (diff)
downloadrockbox-e2c93176f24c77c3f08c3d075a3a2066070d1689.tar.gz
rockbox-e2c93176f24c77c3f08c3d075a3a2066070d1689.tar.bz2
rockbox-e2c93176f24c77c3f08c3d075a3a2066070d1689.zip
iRiver remote buttons support in logo plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6550 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/logo.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 03250f888f..7763fb9737 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -189,6 +189,16 @@ const unsigned char rockbox16x7[] = {
#define LP_INC_Y BUTTON_UP
#endif
+#ifdef CONFIG_REMOTE_KEYPAD
+#if CONFIG_REMOTE_KEYPAD == H100_REMOTE
+#define LP_R_QUIT BUTTON_RC_STOP
+#define LP_R_DEC_X BUTTON_RC_REW
+#define LP_R_INC_X BUTTON_RC_FF
+#define LP_R_DEC_Y BUTTON_RC_SOURCE
+#define LP_R_INC_Y BUTTON_RC_BITRATE
+#endif
+#endif /* CONFIG_REMOTE_KEYPAD */
+
enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
int button;
@@ -273,22 +283,37 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
button = rb->button_get(false);
switch (button) {
case LP_QUIT:
+#ifdef CONFIG_REMOTE_KEYPAD
+ case LP_R_QUIT:
+#endif
#ifdef HAVE_LCD_CHARCELLS
pgfx_release();
#endif
return PLUGIN_OK;
case LP_DEC_X:
+#ifdef CONFIG_REMOTE_KEYPAD
+ case LP_R_DEC_X:
+#endif
if (dx)
dx += (dx < 0) ? 1 : -1;
break;
case LP_INC_X:
+#ifdef CONFIG_REMOTE_KEYPAD
+ case LP_R_INC_X:
+#endif
dx += (dx < 0) ? -1 : 1;
break;
case LP_DEC_Y:
+#ifdef CONFIG_REMOTE_KEYPAD
+ case LP_R_DEC_Y:
+#endif
if (dy)
dy += (dy < 0) ? 1 : -1;
break;
case LP_INC_Y:
+#ifdef CONFIG_REMOTE_KEYPAD
+ case LP_R_INC_Y:
+#endif
dy += (dy < 0) ? -1 : 1;
break;