diff options
-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, | |||
202 | return ACTION_NONE; /* "safest" return value */ | 202 | return ACTION_NONE; /* "safest" return value */ |
203 | } | 203 | } |
204 | last_context = context; | 204 | last_context = context; |
205 | #ifdef HAVE_TOUCHSCREEN | ||
206 | if (button & BUTTON_TOUCHSCREEN) | ||
207 | { | ||
208 | repeated = false; | ||
209 | short_press = false; | ||
210 | if (last_button & BUTTON_TOUCHSCREEN) | ||
211 | { | ||
212 | if ((button & BUTTON_REL) && | ||
213 | ((last_button & BUTTON_REPEAT)==0)) | ||
214 | { | ||
215 | short_press = true; | ||
216 | } | ||
217 | else if (button & BUTTON_REPEAT) | ||
218 | repeated = true; | ||
219 | } | ||
220 | last_button = button; | ||
221 | return ACTION_TOUCHSCREEN; | ||
222 | } | ||
223 | #endif | ||
224 | #ifndef HAS_BUTTON_HOLD | 205 | #ifndef HAS_BUTTON_HOLD |
225 | screen_has_lock = ((context & ALLOW_SOFTLOCK) == ALLOW_SOFTLOCK); | 206 | screen_has_lock = ((context & ALLOW_SOFTLOCK) == ALLOW_SOFTLOCK); |
226 | if (screen_has_lock && keys_locked) | 207 | if (screen_has_lock && keys_locked) |
@@ -245,6 +226,26 @@ static int get_action_worker(int context, int timeout, | |||
245 | context &= ~ALLOW_SOFTLOCK; | 226 | context &= ~ALLOW_SOFTLOCK; |
246 | #endif /* HAS_BUTTON_HOLD */ | 227 | #endif /* HAS_BUTTON_HOLD */ |
247 | 228 | ||
229 | #ifdef HAVE_TOUCHSCREEN | ||
230 | if (button & BUTTON_TOUCHSCREEN) | ||
231 | { | ||
232 | repeated = false; | ||
233 | short_press = false; | ||
234 | if (last_button & BUTTON_TOUCHSCREEN) | ||
235 | { | ||
236 | if ((button & BUTTON_REL) && | ||
237 | ((last_button & BUTTON_REPEAT)==0)) | ||
238 | { | ||
239 | short_press = true; | ||
240 | } | ||
241 | else if (button & BUTTON_REPEAT) | ||
242 | repeated = true; | ||
243 | } | ||
244 | last_button = button; | ||
245 | return ACTION_TOUCHSCREEN; | ||
246 | } | ||
247 | #endif | ||
248 | |||
248 | #if defined(HAVE_LCD_BITMAP) && !defined(BOOTLOADER) | 249 | #if defined(HAVE_LCD_BITMAP) && !defined(BOOTLOADER) |
249 | button = button_flip_horizontally(context, button); | 250 | button = button_flip_horizontally(context, button); |
250 | #endif | 251 | #endif |