mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Hopefully fix FS#11696: scrollwheel doesn't respond in some cases.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28584 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
91beb7a46d
commit
4480e3a82c
2 changed files with 9 additions and 4 deletions
|
@ -205,7 +205,12 @@ static int get_action_worker(int context, int timeout,
|
||||||
pcmbuf_beep(4000, KEYCLICK_DURATION, 2500*global_settings.keyclick);
|
pcmbuf_beep(4000, KEYCLICK_DURATION, 2500*global_settings.keyclick);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((context != last_context) && ((last_button & BUTTON_REL) == 0))
|
if ((context != last_context) && ((last_button & BUTTON_REL) == 0)
|
||||||
|
#ifdef HAVE_SCROLLWHEEL
|
||||||
|
/* Scrollwheel doesn't generate release events */
|
||||||
|
&& !(last_button & (BUTTON_SCROLL_BACK | BUTTON_SCROLL_FWD))
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (button & BUTTON_REL)
|
if (button & BUTTON_REL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,13 +115,13 @@ static bool button_try_post(int button, int data)
|
||||||
/* one can swipe over the scren very quickly,
|
/* one can swipe over the scren very quickly,
|
||||||
* for this to work we want to forget about old presses and
|
* for this to work we want to forget about old presses and
|
||||||
* only respect the very latest ones */
|
* only respect the very latest ones */
|
||||||
const int force_post = true;
|
const bool force_post = true;
|
||||||
#else
|
#else
|
||||||
/* Only post events if the queue is empty,
|
/* Only post events if the queue is empty,
|
||||||
* to avoid afterscroll effects.
|
* to avoid afterscroll effects.
|
||||||
* i.e. don't post new buttons if previous ones haven't been
|
* i.e. don't post new buttons if previous ones haven't been
|
||||||
* processed yet */
|
* processed yet - but always post releases */
|
||||||
const int force_post = false;
|
const bool force_post = button & BUTTON_REL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool ret = queue_empty(&button_queue);
|
bool ret = queue_empty(&button_queue);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue