summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-10-13 12:54:25 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-10-13 12:54:25 +0000
commitc85ff1c0c95f9bf22e1d1fb4c202e1dcdabbb3db (patch)
treef0fe5d6eda341e1b9103cb1be105460f5d8b8b62 /firmware
parent58322542899a4f5de348566e1a65e514b8e5ff66 (diff)
downloadrockbox-c85ff1c0c95f9bf22e1d1fb4c202e1dcdabbb3db.tar.gz
rockbox-c85ff1c0c95f9bf22e1d1fb4c202e1dcdabbb3db.tar.bz2
rockbox-c85ff1c0c95f9bf22e1d1fb4c202e1dcdabbb3db.zip
fix button maps and assign some buttons for uisimulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28268 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/hosted/sdl/app/button-application.c1
-rw-r--r--firmware/target/hosted/sdl/key_to_touch-sdl.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/firmware/target/hosted/sdl/app/button-application.c b/firmware/target/hosted/sdl/app/button-application.c
index 3f31933951..2ad09dc373 100644
--- a/firmware/target/hosted/sdl/app/button-application.c
+++ b/firmware/target/hosted/sdl/app/button-application.c
@@ -34,6 +34,7 @@ int key_to_button(int keyboard_key)
new_btn = BUTTON_TOPLEFT;
break;
case SDLK_KP8:
+ case SDLK_UP:
new_btn = BUTTON_TOPMIDDLE;
break;
case SDLK_KP9:
diff --git a/firmware/target/hosted/sdl/key_to_touch-sdl.c b/firmware/target/hosted/sdl/key_to_touch-sdl.c
index a63df18ff5..d56d06ba74 100644
--- a/firmware/target/hosted/sdl/key_to_touch-sdl.c
+++ b/firmware/target/hosted/sdl/key_to_touch-sdl.c
@@ -51,21 +51,23 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
}
}
break;
-#ifndef CONFIG_PLATFORM
+#ifndef APPLICATION
case SDLK_KP7:
case SDLK_7:
+ case SDLK_HOME:
new_btn = BUTTON_TOPLEFT;
break;
case SDLK_KP8:
case SDLK_8:
case SDLK_UP:
#ifdef HAVE_SCROLLWHEEL
- case SDL_BUTTON_WHEELDOWN:
+ case SDL_BUTTON_WHEELUP:
#endif
new_btn = BUTTON_TOPMIDDLE;
break;
case SDLK_KP9:
case SDLK_9:
+ case SDLK_PAGEUP:
new_btn = BUTTON_TOPRIGHT;
break;
case SDLK_KP4:
@@ -85,6 +87,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
break;
case SDLK_KP1:
case SDLK_j:
+ case SDLK_END:
new_btn = BUTTON_BOTTOMLEFT;
break;
case SDLK_KP2:
@@ -97,6 +100,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords)
break;
case SDLK_KP3:
case SDLK_l:
+ case SDLK_PAGEDOWN:
new_btn = BUTTON_BOTTOMRIGHT;
break;
#endif