diff options
-rw-r--r-- | apps/gui/quickscreen.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index a7d07f4e33..e403e13e6c 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -288,14 +288,22 @@ static bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button) | |||
288 | static int quickscreen_touchscreen_button(void) | 288 | static int quickscreen_touchscreen_button(void) |
289 | { | 289 | { |
290 | short x,y; | 290 | short x,y; |
291 | /* only hitting the text counts, everything else is exit */ | ||
292 | if (action_get_touchscreen_press(&x, &y) != BUTTON_REL) | 291 | if (action_get_touchscreen_press(&x, &y) != BUTTON_REL) |
293 | return ACTION_NONE; | 292 | return ACTION_NONE; |
294 | 293 | ||
295 | enum { left=1, right=2, top=4, bottom=8 }; | 294 | enum { left=1, right=2, top=4, bottom=8 }; |
296 | 295 | ||
297 | int bits = (x < LCD_WIDTH/3 ? left : (x > 2*LCD_WIDTH/3 ? 2 : right)) | | 296 | int bits = 0; |
298 | (y < LCD_WIDTH/3 ? top : (y > 2*LCD_WIDTH/3 ? 8 : bottom)); | 297 | |
298 | if(x < LCD_WIDTH/3) | ||
299 | bits |= left; | ||
300 | else if(x > 2*LCD_WIDTH/3) | ||
301 | bits |= right; | ||
302 | |||
303 | if(y < LCD_HEIGHT/3) | ||
304 | bits |= top; | ||
305 | else if(y > 2*LCD_HEIGHT/3) | ||
306 | bits |= bottom; | ||
299 | 307 | ||
300 | switch(bits) { | 308 | switch(bits) { |
301 | case top: | 309 | case top: |