From aaa1636a8b17ab9ad1e5026c490ca1066280284a Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 26 Aug 2010 11:43:51 +0000 Subject: Move to a proper sdl key config instead of using the d2 pad. make the mouse wheel work, middle click is "select" and right click is "back" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27891 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/hosted/sdl/key_to_touch-sdl.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'firmware/target/hosted/sdl/key_to_touch-sdl.c') diff --git a/firmware/target/hosted/sdl/key_to_touch-sdl.c b/firmware/target/hosted/sdl/key_to_touch-sdl.c index 90518c7c7e..a63df18ff5 100644 --- a/firmware/target/hosted/sdl/key_to_touch-sdl.c +++ b/firmware/target/hosted/sdl/key_to_touch-sdl.c @@ -51,6 +51,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) } } break; +#ifndef CONFIG_PLATFORM case SDLK_KP7: case SDLK_7: new_btn = BUTTON_TOPLEFT; @@ -58,6 +59,9 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) case SDLK_KP8: case SDLK_8: case SDLK_UP: +#ifdef HAVE_SCROLLWHEEL + case SDL_BUTTON_WHEELDOWN: +#endif new_btn = BUTTON_TOPMIDDLE; break; case SDLK_KP9: @@ -71,6 +75,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) break; case SDLK_KP5: case SDLK_i: + case SDL_BUTTON_MIDDLE: new_btn = BUTTON_CENTER; break; case SDLK_KP6: @@ -84,6 +89,9 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) break; case SDLK_KP2: case SDLK_k: +#ifdef HAVE_SCROLLWHEEL + case SDL_BUTTON_WHEELDOWN: +#endif case SDLK_DOWN: new_btn = BUTTON_BOTTOMMIDDLE; break; @@ -91,6 +99,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) case SDLK_l: new_btn = BUTTON_BOTTOMRIGHT; break; +#endif } return new_btn; } -- cgit v1.2.3