diff -Naur rockbox-21519_1/apps/lang/english.lang rockbox-21519/apps/lang/english.lang --- rockbox-21519_1/apps/lang/english.lang 2009-06-27 15:03:49.328125000 +0900 +++ rockbox-21519/apps/lang/english.lang 2009-06-27 15:12:57.437500000 +0900 @@ -12960,3 +12960,17 @@ *: "Estimated Maximum Runtime" + + id: LANG_WHEEL_SPEED + desc: Display for setting IPOD wheel spped + user: + + *: "Thumb Wheel Speed" + + + *: "Thumb Wheel Speed" + + + *: "Thumb Wheel Speed" + + diff -Naur rockbox-21519_1/apps/menus/settings_menu.c rockbox-21519/apps/menus/settings_menu.c --- rockbox-21519_1/apps/menus/settings_menu.c 2009-06-27 15:05:11.250000000 +0900 +++ rockbox-21519/apps/menus/settings_menu.c 2009-06-27 15:31:37.218750000 +0900 @@ -237,6 +237,7 @@ MENUITEM_SETTING(btn_long_press_duration, &global_settings.btn_long_press_duration, NULL); +MENUITEM_SETTING(wheel_speed, &global_settings.wheel_speed, NULL); #if CONFIG_CODEC == MAS3507D void dac_line_in(bool enable); @@ -311,6 +312,7 @@ &keyclick_menu, #endif &btn_long_press_duration, + &wheel_speed, #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING &touchpad_sensitivity, #endif diff -Naur rockbox-21519_1/apps/settings.h rockbox-21519/apps/settings.h --- rockbox-21519_1/apps/settings.h 2009-06-27 15:04:22.812500000 +0900 +++ rockbox-21519/apps/settings.h 2009-06-27 15:28:23.546875000 +0900 @@ -854,6 +853,8 @@ version. */ /* new stuff to be added at the end */ + int wheel_speed; + //bool pause_between_tracks; /* Pauses the playback on track changes */ int max_runtime; int btn_long_press_duration; /* Long press duration in ticks (=1/100s) */ bool party_mode_selection; diff -Naur rockbox-21519_1/apps/settings_list.c rockbox-21519/apps/settings_list.c --- rockbox-21519_1/apps/settings_list.c 2009-06-27 15:05:51.437500000 +0900 +++ rockbox-21519/apps/settings_list.c 2009-06-27 15:19:59.156250000 +0900 @@ -884,6 +884,9 @@ INT_SETTING(0, btn_long_press_duration, LANG_BTN_LONG_PRESS_DURATION, 30, "button long press duration", UNIT_INT, 20, 50, 1, NULL, NULL, set_button_long_press_duration), + INT_SETTING(0, wheel_speed, LANG_WHEEL_SPEED, 4, + "wheel_speed", UNIT_INT, 1, 20, 1, NULL, NULL, + set_wheel_speed), #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE) STRINGCHOICE_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0,"antiskip", "5s,15s,30s,1min,2min,3min,5min,10min", NULL, 8, diff -Naur rockbox-21519_1/firmware/export/button.h rockbox-21519/firmware/export/button.h --- rockbox-21519_1/firmware/export/button.h 2009-06-27 14:59:50.296875000 +0900 +++ rockbox-21519/firmware/export/button.h 2009-06-27 15:26:50.234375000 +0900 @@ -78,7 +78,7 @@ #endif void set_button_long_press_duration(int ticks); - +void set_wheel_speed(int wheel_speed); #define BUTTON_NONE 0x00000000 diff -Naur rockbox-21519_1/firmware/target/arm/ipod/button-clickwheel.c rockbox-21519/firmware/target/arm/ipod/button-clickwheel.c --- rockbox-21519_1/firmware/target/arm/ipod/button-clickwheel.c 2009-06-26 13:17:21.671875000 +0900 +++ rockbox-21519/firmware/target/arm/ipod/button-clickwheel.c 2009-06-27 16:01:01.000000000 +0900 @@ -45,15 +45,7 @@ #define WHEEL_UNTOUCH_TIMEOUT 150000 /* timeout for untouching wheel = 100ms */ #define WHEELCLICKS_PER_ROTATION 96 /* wheelclicks per full rotation */ -/* This amount of clicks is needed for at least scrolling 1 item. Choose small values - * to have high sensitivity but few precision, choose large values to have less - * sensitivity and good precision. */ -#if defined(IPOD_NANO) -#define WHEEL_SENSITIVITY 6 /* iPod nano has smaller wheel, lower sensitivity needed */ -#else -//#define WHEEL_SENSITIVITY 4 /* default sensitivity */ -#define WHEEL_SENSITIVITY 7 /* default sensitivity */ -#endif +static int wheelspeed = 4; int old_wheel_value = -1; int new_wheel_value = 0; @@ -151,9 +143,9 @@ /* Getting direction and wheel_keycode from wheel_delta. * Need at least some clicks to be sure to avoid haptic fuzziness */ - if (wheel_delta >= WHEEL_SENSITIVITY) + if (wheel_delta >= wheelspeed) wheel_keycode = BUTTON_SCROLL_FWD; - else if (wheel_delta <= -WHEEL_SENSITIVITY) + else if (wheel_delta <= -wheelspeed) wheel_keycode = BUTTON_SCROLL_BACK; else wheel_keycode = BUTTON_NONE; @@ -209,7 +201,7 @@ if (queue_empty(&button_queue)) { /* each WHEEL_SENSITIVITY clicks = scrolling 1 item */ - accumulated_wheel_delta /= WHEEL_SENSITIVITY; + accumulated_wheel_delta /= wheelspeed; #ifdef HAVE_SCROLLWHEEL /* use data-format for HAVE_SCROLLWHEEL */ /* always use acceleration mode (1<<31) */ @@ -261,6 +253,11 @@ { send_events = send; } + +void set_wheel_speed(int wheel_speed) +{ + wheelspeed = wheel_speed; +} #endif void ipod_4g_button_int(void)