diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-10-28 21:36:24 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-10-28 21:36:24 +0000 |
commit | 7b1d12e0671b6db76711387482faf528caca9b55 (patch) | |
tree | cc82d16172e877f7f8374a8655b02e36b2569772 | |
parent | e415395c5b789918383802d536ad51123e338daf (diff) | |
download | rockbox-7b1d12e0671b6db76711387482faf528caca9b55.tar.gz rockbox-7b1d12e0671b6db76711387482faf528caca9b55.zip |
Touchscreen targets: fix software hold not locking touchscreen
Flyspray: FS#10733
Author: Yann Muller
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23384 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/action.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/apps/action.c b/apps/action.c index 2eef7d9d7b..7ec838fa7f 100644 --- a/apps/action.c +++ b/apps/action.c @@ -202,25 +202,6 @@ static int get_action_worker(int context, int timeout, return ACTION_NONE; /* "safest" return value */ } last_context = context; -#ifdef HAVE_TOUCHSCREEN - if (button & BUTTON_TOUCHSCREEN) - { - repeated = false; - short_press = false; - if (last_button & BUTTON_TOUCHSCREEN) - { - if ((button & BUTTON_REL) && - ((last_button & BUTTON_REPEAT)==0)) - { - short_press = true; - } - else if (button & BUTTON_REPEAT) - repeated = true; - } - last_button = button; - return ACTION_TOUCHSCREEN; - } -#endif #ifndef HAS_BUTTON_HOLD screen_has_lock = ((context & ALLOW_SOFTLOCK) == ALLOW_SOFTLOCK); if (screen_has_lock && keys_locked) @@ -245,6 +226,26 @@ static int get_action_worker(int context, int timeout, context &= ~ALLOW_SOFTLOCK; #endif /* HAS_BUTTON_HOLD */ +#ifdef HAVE_TOUCHSCREEN + if (button & BUTTON_TOUCHSCREEN) + { + repeated = false; + short_press = false; + if (last_button & BUTTON_TOUCHSCREEN) + { + if ((button & BUTTON_REL) && + ((last_button & BUTTON_REPEAT)==0)) + { + short_press = true; + } + else if (button & BUTTON_REPEAT) + repeated = true; + } + last_button = button; + return ACTION_TOUCHSCREEN; + } +#endif + #if defined(HAVE_LCD_BITMAP) && !defined(BOOTLOADER) button = button_flip_horizontally(context, button); #endif |