diff options
author | Jens Arnold <amiconn@rockbox.org> | 2010-08-20 21:00:15 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2010-08-20 21:00:15 +0000 |
commit | 43ccc1eef7a7dae532e36e5ee3fdd144637eb279 (patch) | |
tree | 31e9f3ca77712981b368fd06a301d8d6c57811bd /firmware/target/arm/ipod | |
parent | 333c0cc6b01a7e298f983c43339dc5eb9fef7019 (diff) |
Enable wheel acceleration and repeats for iPod 1st/2nd Gen, using the same settings as on iPod 3rd Gen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27849 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r-- | firmware/target/arm/ipod/button-1g-3g.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/firmware/target/arm/ipod/button-1g-3g.c b/firmware/target/arm/ipod/button-1g-3g.c index 071df3294c..045a0f6d8a 100644 --- a/firmware/target/arm/ipod/button-1g-3g.c +++ b/firmware/target/arm/ipod/button-1g-3g.c @@ -49,7 +49,6 @@ static int int_btn = BUTTON_NONE; #define WHEEL_TIMEOUT (HZ/4) #endif -#ifdef IPOD_3G #define WHEELCLICKS_PER_ROTATION 96 #define WHEEL_BASE_SENSITIVITY 6 /* Compute every ... clicks */ #define WHEEL_REPEAT_VELOCITY 45 /* deg/s */ @@ -188,52 +187,6 @@ static void handle_scroll_wheel(int new_scroll) last_wheel_usec = usec; } -#else -static void handle_scroll_wheel(int new_scroll) -{ - int wheel_keycode = BUTTON_NONE; - static int prev_scroll = -1; - static int direction = 0; - static int count = 0; - static int scroll_state[4][4] = { - {0, 1, -1, 0}, - {-1, 0, 0, 1}, - {1, 0, 0, -1}, - {0, -1, 1, 0} - }; - - if ( prev_scroll == -1 ) { - prev_scroll = new_scroll; - } - else if (direction != scroll_state[prev_scroll][new_scroll]) { - direction = scroll_state[prev_scroll][new_scroll]; - count = 0; - } - else { - backlight_on(); - reset_poweroff_timer(); - if (++count == 6) { /* reduce sensitivity */ - count = 0; - /* 1st..3rd Gen wheel has inverse direction mapping - * compared to Mini 1st Gen wheel. */ - switch (direction) { - case 1: - wheel_keycode = BUTTON_SCROLL_BACK; - break; - case -1: - wheel_keycode = BUTTON_SCROLL_FWD; - break; - default: - /* only happens if we get out of sync */ - break; - } - } - } - if (wheel_keycode != BUTTON_NONE && queue_empty(&button_queue)) - queue_post(&button_queue, wheel_keycode, 0); - prev_scroll = new_scroll; -} -#endif /* IPOD_3G */ static int ipod_3g_button_read(void) { |