summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-06-06 10:27:14 +0000
committerThomas Martitz <kugel@rockbox.org>2010-06-06 10:27:14 +0000
commit19ac3453e0ed2b3fe458a0f4aeca4883c53b490e (patch)
treeabd52a5284371b433f6a616d0863776de368179f /firmware/target/hosted
parent60295024681cf2ef4e97359e4243a2f9d3989890 (diff)
downloadrockbox-19ac3453e0ed2b3fe458a0f4aeca4883c53b490e.tar.gz
rockbox-19ac3453e0ed2b3fe458a0f4aeca4883c53b490e.tar.bz2
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
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/sdl/button-sdl.c34
1 files changed, 33 insertions, 1 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)
return;
#endif
+#if defined(IRIVER_H100_SERIES) || defined (IRIVER_H300_SERIES)
+ case SDLK_t:
+ if(pressed)
+ switch(_remote_type)
+ {
+ case REMOTETYPE_UNPLUGGED:
+ _remote_type=REMOTETYPE_H100_LCD;
+ DEBUGF("Changed remote type to H100\n");
+ break;
+ case REMOTETYPE_H100_LCD:
+ _remote_type=REMOTETYPE_H300_LCD;
+ DEBUGF("Changed remote type to H300\n");
+ break;
+ case REMOTETYPE_H300_LCD:
+ _remote_type=REMOTETYPE_H300_NONLCD;
+ DEBUGF("Changed remote type to H300 NON-LCD\n");
+ break;
+ case REMOTETYPE_H300_NONLCD:
+ _remote_type=REMOTETYPE_UNPLUGGED;
+ DEBUGF("Changed remote type to none\n");
+ break;
+ }
+ break;
+#endif
case SDLK_KP0:
case SDLK_F5:
if(pressed)
@@ -236,9 +260,17 @@ static void button_event(int key, bool pressed)
return;
}
break;
+#ifdef HAVE_TOUCHSCREEN
+ case SDLK_F4:
+ if(pressed)
+ {
+ touchscreen_set_mode(touchscreen_get_mode() == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT);
+ printf("Touchscreen mode: %s\n", touchscreen_get_mode() == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON");
+ }
+#endif
default:
#ifdef HAVE_TOUCHSCREEN
- new_btn = key_to_touch(key);
+ new_btn = key_to_touch(key, mouse_coords);
if (!new_btn)
#endif
new_btn = key_to_button(key);