diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-06-06 10:27:14 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-06-06 10:27:14 +0000 |
commit | 19ac3453e0ed2b3fe458a0f4aeca4883c53b490e (patch) | |
tree | abd52a5284371b433f6a616d0863776de368179f | |
parent | 60295024681cf2ef4e97359e4243a2f9d3989890 (diff) | |
download | rockbox-19ac3453e0ed2b3fe458a0f4aeca4883c53b490e.tar.gz rockbox-19ac3453e0ed2b3fe458a0f4aeca4883c53b490e.zip |
Fix most reds, I have no idea what's wrong with the gigabeats (yet).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26619 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/hosted/sdl/button-sdl.c | 34 | ||||
-rw-r--r-- | uisimulator/buttonmap/SOURCES | 2 | ||||
-rw-r--r-- | uisimulator/buttonmap/buttonmap.h | 2 | ||||
-rw-r--r-- | uisimulator/buttonmap/gigabeat-s.c | 4 | ||||
-rw-r--r-- | uisimulator/buttonmap/gigabeat.c | 1 | ||||
-rw-r--r-- | uisimulator/buttonmap/iaudio-m3.c (renamed from uisimulator/buttonmap/iaudo-m3.c) | 0 | ||||
-rw-r--r-- | uisimulator/buttonmap/iriver-h100_h300.c | 22 | ||||
-rw-r--r-- | uisimulator/buttonmap/touchscreen.c | 9 |
8 files changed, 40 insertions, 34 deletions
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index 2f971d7a4e..dd55373ef3 100644 --- a/firmware/target/hosted/sdl/button-sdl.c +++ b/firmware/target/hosted/sdl/button-sdl.c | |||
@@ -228,6 +228,30 @@ static void button_event(int key, bool pressed) | |||
228 | return; | 228 | return; |
229 | #endif | 229 | #endif |
230 | 230 | ||
231 | #if defined(IRIVER_H100_SERIES) || defined (IRIVER_H300_SERIES) | ||
232 | case SDLK_t: | ||
233 | if(pressed) | ||
234 | switch(_remote_type) | ||
235 | { | ||
236 | case REMOTETYPE_UNPLUGGED: | ||
237 | _remote_type=REMOTETYPE_H100_LCD; | ||
238 | DEBUGF("Changed remote type to H100\n"); | ||
239 | break; | ||
240 | case REMOTETYPE_H100_LCD: | ||
241 | _remote_type=REMOTETYPE_H300_LCD; | ||
242 | DEBUGF("Changed remote type to H300\n"); | ||
243 | break; | ||
244 | case REMOTETYPE_H300_LCD: | ||
245 | _remote_type=REMOTETYPE_H300_NONLCD; | ||
246 | DEBUGF("Changed remote type to H300 NON-LCD\n"); | ||
247 | break; | ||
248 | case REMOTETYPE_H300_NONLCD: | ||
249 | _remote_type=REMOTETYPE_UNPLUGGED; | ||
250 | DEBUGF("Changed remote type to none\n"); | ||
251 | break; | ||
252 | } | ||
253 | break; | ||
254 | #endif | ||
231 | case SDLK_KP0: | 255 | case SDLK_KP0: |
232 | case SDLK_F5: | 256 | case SDLK_F5: |
233 | if(pressed) | 257 | if(pressed) |
@@ -236,9 +260,17 @@ static void button_event(int key, bool pressed) | |||
236 | return; | 260 | return; |
237 | } | 261 | } |
238 | break; | 262 | break; |
263 | #ifdef HAVE_TOUCHSCREEN | ||
264 | case SDLK_F4: | ||
265 | if(pressed) | ||
266 | { | ||
267 | touchscreen_set_mode(touchscreen_get_mode() == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT); | ||
268 | printf("Touchscreen mode: %s\n", touchscreen_get_mode() == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON"); | ||
269 | } | ||
270 | #endif | ||
239 | default: | 271 | default: |
240 | #ifdef HAVE_TOUCHSCREEN | 272 | #ifdef HAVE_TOUCHSCREEN |
241 | new_btn = key_to_touch(key); | 273 | new_btn = key_to_touch(key, mouse_coords); |
242 | if (!new_btn) | 274 | if (!new_btn) |
243 | #endif | 275 | #endif |
244 | new_btn = key_to_button(key); | 276 | new_btn = key_to_button(key); |
diff --git a/uisimulator/buttonmap/SOURCES b/uisimulator/buttonmap/SOURCES index 4d99093e7d..06be7450ab 100644 --- a/uisimulator/buttonmap/SOURCES +++ b/uisimulator/buttonmap/SOURCES | |||
@@ -59,7 +59,7 @@ onda-vx747.c | |||
59 | #elif CONFIG_KEYPAD == ONDAVX777_PAD | 59 | #elif CONFIG_KEYPAD == ONDAVX777_PAD |
60 | onda-vx777.c | 60 | onda-vx777.c |
61 | #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD | 61 | #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD |
62 | samsung-yh820_yh925.c | 62 | samsung-yh820_yh92x.c |
63 | #elif CONFIG_KEYPAD == PBELL_VIBE500_PAD | 63 | #elif CONFIG_KEYPAD == PBELL_VIBE500_PAD |
64 | pbell-vibe500.c | 64 | pbell-vibe500.c |
65 | #elif CONFIG_KEYPAD == MPIO_HD200_PAD | 65 | #elif CONFIG_KEYPAD == MPIO_HD200_PAD |
diff --git a/uisimulator/buttonmap/buttonmap.h b/uisimulator/buttonmap/buttonmap.h index d5b951af9b..2f14cea9c4 100644 --- a/uisimulator/buttonmap/buttonmap.h +++ b/uisimulator/buttonmap/buttonmap.h | |||
@@ -36,7 +36,7 @@ int xy2button( int x, int y); | |||
36 | 36 | ||
37 | int key_to_button(int keyboard_button); | 37 | int key_to_button(int keyboard_button); |
38 | #ifdef HAVE_TOUCHSCREEN | 38 | #ifdef HAVE_TOUCHSCREEN |
39 | int key_to_touch(int keyboard_button); | 39 | int key_to_touch(int keyboard_button, unsigned int mouse_coords); |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #endif /* __BUTTONMAP_H__ */ | 42 | #endif /* __BUTTONMAP_H__ */ |
diff --git a/uisimulator/buttonmap/gigabeat-s.c b/uisimulator/buttonmap/gigabeat-s.c index 98a8489446..5c139c470f 100644 --- a/uisimulator/buttonmap/gigabeat-s.c +++ b/uisimulator/buttonmap/gigabeat-s.c | |||
@@ -20,6 +20,10 @@ n/*************************************************************************** | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | 22 | ||
23 | #include <SDL.h> | ||
24 | #include "button.h" | ||
25 | #include "buttonmap.h" | ||
26 | |||
23 | int key_to_button(int keyboard_button) | 27 | int key_to_button(int keyboard_button) |
24 | { | 28 | { |
25 | int new_btn = BUTTON_NONE; | 29 | int new_btn = BUTTON_NONE; |
diff --git a/uisimulator/buttonmap/gigabeat.c b/uisimulator/buttonmap/gigabeat.c index 02055cf0b9..84b42a5c8a 100644 --- a/uisimulator/buttonmap/gigabeat.c +++ b/uisimulator/buttonmap/gigabeat.c | |||
@@ -19,7 +19,6 @@ n/*************************************************************************** | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | |||
23 | #include <SDL.h> | 22 | #include <SDL.h> |
24 | #include "button.h" | 23 | #include "button.h" |
25 | #include "buttonmap.h" | 24 | #include "buttonmap.h" |
diff --git a/uisimulator/buttonmap/iaudo-m3.c b/uisimulator/buttonmap/iaudio-m3.c index 1ab1392f47..1ab1392f47 100644 --- a/uisimulator/buttonmap/iaudo-m3.c +++ b/uisimulator/buttonmap/iaudio-m3.c | |||
diff --git a/uisimulator/buttonmap/iriver-h100_h300.c b/uisimulator/buttonmap/iriver-h100_h300.c index 5e4ad3bafc..e6ca389fc8 100644 --- a/uisimulator/buttonmap/iriver-h100_h300.c +++ b/uisimulator/buttonmap/iriver-h100_h300.c | |||
@@ -29,28 +29,6 @@ int key_to_button(int keyboard_button) | |||
29 | int new_btn = BUTTON_NONE; | 29 | int new_btn = BUTTON_NONE; |
30 | switch (keyboard_button) | 30 | switch (keyboard_button) |
31 | { | 31 | { |
32 | case SDLK_t: | ||
33 | if(pressed) | ||
34 | switch(_remote_type) | ||
35 | { | ||
36 | case REMOTETYPE_UNPLUGGED: | ||
37 | _remote_type=REMOTETYPE_H100_LCD; | ||
38 | DEBUGF("Changed remote type to H100\n"); | ||
39 | break; | ||
40 | case REMOTETYPE_H100_LCD: | ||
41 | _remote_type=REMOTETYPE_H300_LCD; | ||
42 | DEBUGF("Changed remote type to H300\n"); | ||
43 | break; | ||
44 | case REMOTETYPE_H300_LCD: | ||
45 | _remote_type=REMOTETYPE_H300_NONLCD; | ||
46 | DEBUGF("Changed remote type to H300 NON-LCD\n"); | ||
47 | break; | ||
48 | case REMOTETYPE_H300_NONLCD: | ||
49 | _remote_type=REMOTETYPE_UNPLUGGED; | ||
50 | DEBUGF("Changed remote type to none\n"); | ||
51 | break; | ||
52 | } | ||
53 | break; | ||
54 | case SDLK_KP4: | 32 | case SDLK_KP4: |
55 | case SDLK_LEFT: | 33 | case SDLK_LEFT: |
56 | new_btn = BUTTON_LEFT; | 34 | new_btn = BUTTON_LEFT; |
diff --git a/uisimulator/buttonmap/touchscreen.c b/uisimulator/buttonmap/touchscreen.c index 746a6d5f20..90518c7c7e 100644 --- a/uisimulator/buttonmap/touchscreen.c +++ b/uisimulator/buttonmap/touchscreen.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "buttonmap.h" | 26 | #include "buttonmap.h" |
27 | #include "touchscreen.h" | 27 | #include "touchscreen.h" |
28 | 28 | ||
29 | int key_to_touch(int keyboard_button) | 29 | int key_to_touch(int keyboard_button, unsigned int mouse_coords) |
30 | { | 30 | { |
31 | int new_btn = BUTTON_NONE; | 31 | int new_btn = BUTTON_NONE; |
32 | switch (keyboard_button) | 32 | switch (keyboard_button) |
@@ -91,13 +91,6 @@ int key_to_touch(int keyboard_button) | |||
91 | case SDLK_l: | 91 | case SDLK_l: |
92 | new_btn = BUTTON_BOTTOMRIGHT; | 92 | new_btn = BUTTON_BOTTOMRIGHT; |
93 | break; | 93 | break; |
94 | case SDLK_F4: | ||
95 | if(pressed) | ||
96 | { | ||
97 | touchscreen_set_mode(touchscreen_get_mode() == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT); | ||
98 | printf("Touchscreen mode: %s\n", touchscreen_get_mode() == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON"); | ||
99 | } | ||
100 | break; | ||
101 | } | 94 | } |
102 | return new_btn; | 95 | return new_btn; |
103 | } | 96 | } |