summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl/button.c
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2008-11-14 21:57:43 +0000
committerDominik Wenger <domonoky@googlemail.com>2008-11-14 21:57:43 +0000
commit83dc89f751bc57e060f5a4882beafb3064c3fd80 (patch)
tree23a1549588a9fc55850b6952cb5a4ffdc393f489 /uisimulator/sdl/button.c
parent9a0224fd2800facac398b09ba386973c8ad0cab5 (diff)
downloadrockbox-83dc89f751bc57e060f5a4882beafb3064c3fd80.tar.gz
rockbox-83dc89f751bc57e060f5a4882beafb3064c3fd80.tar.bz2
rockbox-83dc89f751bc57e060f5a4882beafb3064c3fd80.zip
m200v4: make buttons work again (added a small delay). make m200 keymap better. Add button mappings for the sim. Remove some config defines temporary to make building work again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19104 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl/button.c')
-rw-r--r--uisimulator/sdl/button.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 614308a070..6246228dd8 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -1020,6 +1020,35 @@ void button_event(int key, bool pressed)
case SDLK_p:
new_btn = BUTTON_POWER;
break;
+#elif CONFIG_KEYPAD == SANSA_M200_PAD
+ case SDLK_KP4:
+ case SDLK_LEFT:
+ new_btn = BUTTON_LEFT;
+ break;
+ case SDLK_KP6:
+ case SDLK_RIGHT:
+ new_btn = BUTTON_RIGHT;
+ break;
+ case SDLK_KP8:
+ case SDLK_UP:
+ new_btn = BUTTON_PLAYPAUSE;
+ break;
+ case SDLK_KP2:
+ case SDLK_DOWN:
+ new_btn = BUTTON_REPEATAB;
+ break;
+ case SDLK_PLUS:
+ new_btn = BUTTON_MENU;
+ break;
+ case SDLK_KP5:
+ new_btn = BUTTON_SELECT;
+ break;
+ case SDLK_KP7:
+ new_btn = BUTTON_VOLDOWN;
+ break;
+ case SDLK_KP9:
+ new_btn = BUTTON_VOLUP;
+ break;
#else
#error No keymap defined!
#endif /* CONFIG_KEYPAD */