diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-08-26 11:43:51 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-08-26 11:43:51 +0000 |
commit | aaa1636a8b17ab9ad1e5026c490ca1066280284a (patch) | |
tree | d3ab4701aae8639b949b4ec24f9f8da09b0f4cd9 /firmware/target/hosted/sdl/key_to_touch-sdl.c | |
parent | 1d613bee0fd4b3bb6266a7ad93aade2aaeb3705c (diff) | |
download | rockbox-aaa1636a8b17ab9ad1e5026c490ca1066280284a.tar.gz rockbox-aaa1636a8b17ab9ad1e5026c490ca1066280284a.zip |
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
Diffstat (limited to 'firmware/target/hosted/sdl/key_to_touch-sdl.c')
-rw-r--r-- | firmware/target/hosted/sdl/key_to_touch-sdl.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | break; | 53 | break; |
54 | #ifndef CONFIG_PLATFORM | ||
54 | case SDLK_KP7: | 55 | case SDLK_KP7: |
55 | case SDLK_7: | 56 | case SDLK_7: |
56 | new_btn = BUTTON_TOPLEFT; | 57 | new_btn = BUTTON_TOPLEFT; |
@@ -58,6 +59,9 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) | |||
58 | case SDLK_KP8: | 59 | case SDLK_KP8: |
59 | case SDLK_8: | 60 | case SDLK_8: |
60 | case SDLK_UP: | 61 | case SDLK_UP: |
62 | #ifdef HAVE_SCROLLWHEEL | ||
63 | case SDL_BUTTON_WHEELDOWN: | ||
64 | #endif | ||
61 | new_btn = BUTTON_TOPMIDDLE; | 65 | new_btn = BUTTON_TOPMIDDLE; |
62 | break; | 66 | break; |
63 | case SDLK_KP9: | 67 | case SDLK_KP9: |
@@ -71,6 +75,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) | |||
71 | break; | 75 | break; |
72 | case SDLK_KP5: | 76 | case SDLK_KP5: |
73 | case SDLK_i: | 77 | case SDLK_i: |
78 | case SDL_BUTTON_MIDDLE: | ||
74 | new_btn = BUTTON_CENTER; | 79 | new_btn = BUTTON_CENTER; |
75 | break; | 80 | break; |
76 | case SDLK_KP6: | 81 | case SDLK_KP6: |
@@ -84,6 +89,9 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) | |||
84 | break; | 89 | break; |
85 | case SDLK_KP2: | 90 | case SDLK_KP2: |
86 | case SDLK_k: | 91 | case SDLK_k: |
92 | #ifdef HAVE_SCROLLWHEEL | ||
93 | case SDL_BUTTON_WHEELDOWN: | ||
94 | #endif | ||
87 | case SDLK_DOWN: | 95 | case SDLK_DOWN: |
88 | new_btn = BUTTON_BOTTOMMIDDLE; | 96 | new_btn = BUTTON_BOTTOMMIDDLE; |
89 | break; | 97 | break; |
@@ -91,6 +99,7 @@ int key_to_touch(int keyboard_button, unsigned int mouse_coords) | |||
91 | case SDLK_l: | 99 | case SDLK_l: |
92 | new_btn = BUTTON_BOTTOMRIGHT; | 100 | new_btn = BUTTON_BOTTOMRIGHT; |
93 | break; | 101 | break; |
102 | #endif | ||
94 | } | 103 | } |
95 | return new_btn; | 104 | return new_btn; |
96 | } | 105 | } |