summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-01-17 21:14:34 +0000
committerJens Arnold <amiconn@rockbox.org>2005-01-17 21:14:34 +0000
commite6f403f5099bf469a4349ce5613f9ef330cd6240 (patch)
treecf7a3682edba4f840c3c20d4a5f94c3d45fb799a /uisimulator
parentb96333a114641f27c7f85859f38c5b61b72f4eaa (diff)
downloadrockbox-e6f403f5099bf469a4349ce5613f9ef330cd6240.tar.gz
rockbox-e6f403f5099bf469a4349ce5613f9ef330cd6240.tar.bz2
rockbox-e6f403f5099bf469a4349ce5613f9ef330cd6240.zip
X11 sim: Button handling adapted to iRiver and reworked a bit. Removed tab chars.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5587 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/x11/button-x11.c129
1 files changed, 67 insertions, 62 deletions
diff --git a/uisimulator/x11/button-x11.c b/uisimulator/x11/button-x11.c
index d6837f640a..a8dd709110 100644
--- a/uisimulator/x11/button-x11.c
+++ b/uisimulator/x11/button-x11.c
@@ -60,104 +60,109 @@ static int get_raw_button (void)
int ev=screenhack_handle_events(&release, &repeat);
switch(ev)
{
- case XK_KP_Left:
- case XK_Left:
- case XK_KP_4:
- k = BUTTON_LEFT;
+ case XK_KP_Left:
+ case XK_Left:
+ case XK_KP_4:
+ k = BUTTON_LEFT;
break;
- case XK_KP_Right:
- case XK_Right:
- case XK_KP_6:
- k = BUTTON_RIGHT;
+ case XK_KP_Right:
+ case XK_Right:
+ case XK_KP_6:
+ k = BUTTON_RIGHT;
break;
- case XK_KP_Up:
- case XK_Up:
- case XK_KP_8:
+ case XK_KP_Up:
+ case XK_Up:
+ case XK_KP_8:
#ifdef BUTTON_UP
- k = BUTTON_UP;
+ k = BUTTON_UP;
#elif defined BUTTON_PLAY
- k = BUTTON_PLAY;
+ k = BUTTON_PLAY;
#endif
break;
- case XK_KP_Down:
- case XK_Down:
- case XK_KP_2:
+ case XK_KP_Down:
+ case XK_Down:
+ case XK_KP_2:
#ifdef BUTTON_DOWN
- k = BUTTON_DOWN;
+ k = BUTTON_DOWN;
#elif defined BUTTON_STOP
- k = BUTTON_STOP;
+ k = BUTTON_STOP;
#endif
break;
-#ifdef BUTTON_PLAY
- case XK_KP_Space:
- case XK_KP_5:
- case XK_KP_Begin:
- case XK_space:
- k = BUTTON_PLAY;
+#ifdef BUTTON_ON
+ case XK_KP_Add:
+ case XK_Q:
+ case XK_q:
+ k = BUTTON_ON;
break;
#endif
#ifdef BUTTON_OFF
- case XK_KP_Enter:
- case XK_A:
- case XK_a:
- k = BUTTON_OFF;
- break;
-#endif
-
-#ifdef BUTTON_ON
- case XK_KP_Add:
- case XK_Q:
- case XK_q:
- k = BUTTON_ON;
+ case XK_KP_Enter:
+ case XK_A:
+ case XK_a:
+ k = BUTTON_OFF;
break;
#endif
#ifdef BUTTON_F1
- case XK_KP_Divide:
- case XK_1:
- k = BUTTON_F1;
+ case XK_KP_Divide:
+ case XK_1:
+ k = BUTTON_F1;
break;
- case XK_KP_Multiply:
- case XK_2:
- k = BUTTON_F2;
+ case XK_KP_Multiply:
+ case XK_2:
+ k = BUTTON_F2;
break;
- case XK_KP_Subtract:
- case XK_3:
- k = BUTTON_F3;
+ case XK_KP_Subtract:
+ case XK_3:
+ k = BUTTON_F3;
break;
+#elif defined(BUTTON_REC)
+ case XK_KP_Divide:
+ case XK_1:
+ k = BUTTON_REC;
+ break;
#endif
-#ifdef HAVE_LCD_BITMAP
- case XK_5:
- if(!release)
- {
- screen_dump();
- return 0;
- }
+ case XK_KP_Space:
+ case XK_KP_5:
+ case XK_KP_Begin:
+ case XK_space:
+#ifdef BUTTON_PLAY
+ k = BUTTON_PLAY;
+#elif defined(BUTTON_SELECT)
+ k = BUTTON_SELECT;
+#endif
break;
+
+#ifdef HAVE_LCD_BITMAP
+ case XK_5:
+ if(!release)
+ {
+ screen_dump();
+ return 0;
+ }
+ break;
#endif
+ case XK_KP_Separator:
+ case XK_KP_Insert:
+ case XK_Insert:
#ifdef BUTTON_MENU
-#if CONFIG_KEYPAD == PLAYER_PAD
- case XK_KP_Enter:
- case XK_Return:
-#elif CONFIG_KEYPAD == ONDIO_PAD
- case XK_KP_Insert:
- case XK_Control_R:
+ k = BUTTON_MENU;
+#elif defined(BUTTON_MODE)
+ k = BUTTON_MODE;
#endif
- k = BUTTON_MENU;
break;
-#endif
- default:
- k = 0;
+ default:
+ k = 0;
if(ev)
DEBUGF("received ev %d\n", ev);
break;