Index: firmware/target/arm/ipod/button-clickwheel.c =================================================================== --- firmware/target/arm/ipod/button-clickwheel.c (revision 16461) +++ firmware/target/arm/ipod/button-clickwheel.c (working copy) @@ -157,6 +157,8 @@ wheel_keycode = BUTTON_SCROLL_BACK; else wheel_keycode = BUTTON_NONE; + + btn |= wheel_keycode; /* set result to btn for gui boost handling */ if (wheel_keycode != BUTTON_NONE) { @@ -173,7 +175,7 @@ v = (v<0) ? -v : v; /* undo signedness */ /* some velocity filtering to smooth things out */ - wheel_velocity = (31 * wheel_velocity + v) / 32; + wheel_velocity = (15 * wheel_velocity + v) / 16; /* limit to 24 bit */ wheel_velocity = (wheel_velocity>0xffffff) ? 0xffffff : wheel_velocity; Index: firmware/drivers/button.c =================================================================== --- firmware/drivers/button.c (revision 16461) +++ firmware/drivers/button.c (working copy) @@ -93,6 +93,24 @@ } #endif +#ifdef HAVE_ADJUSTABLE_CPU_FREQ +static void gui_boost(bool state) +{ + static bool boosted = false; + + if (state && !boosted) + { + cpu_boost(true); + boosted = true; + } + else if (!state && boosted) + { + cpu_boost(false); + boosted = false; + } +} +#endif /* HAVE_ADJUSTABLE_CPU_FREQ */ + static void button_tick(void) { static int count = 0; @@ -106,6 +124,10 @@ static bool skip_remote_release = false; #endif #endif +#ifdef HAVE_ADJUSTABLE_CPU_FREQ + static unsigned long last_button_usec; + unsigned long usec = USEC_TIMER; +#endif int diff; int btn; #ifdef HAVE_BUTTON_DATA @@ -139,6 +161,19 @@ } #endif +#ifdef HAVE_ADJUSTABLE_CPU_FREQ + /* Boost gui on button activity, unboost gui after timeout. */ + if (BUTTON_NONE != btn) + { + last_button_usec = usec; + gui_boost(true); + } + else if (TIME_AFTER(usec, last_button_usec + 1000000)) + { + gui_boost(false); + } +#endif + /* Find out if a key has been released */ diff = btn ^ lastbtn; if(diff && (btn & diff) == 0)