summaryrefslogtreecommitdiff
path: root/firmware/drivers/button.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/button.c')
-rw-r--r--firmware/drivers/button.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 100957b77a..f116ad646e 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -429,7 +429,6 @@ void button_init(void)
429 tick_add_task(button_tick); 429 tick_add_task(button_tick);
430} 430}
431 431
432#ifndef SIMULATOR
433#ifdef BUTTON_DRIVER_CLOSE 432#ifdef BUTTON_DRIVER_CLOSE
434void button_close(void) 433void button_close(void)
435{ 434{
@@ -443,9 +442,10 @@ void button_close(void)
443 */ 442 */
444static int button_flip(int button) 443static int button_flip(int button)
445{ 444{
446 int newbutton; 445 int newbutton = button;
447 446
448 newbutton = button & 447#ifndef SIMULATOR
448 newbutton &=
449 ~(BUTTON_LEFT | BUTTON_RIGHT 449 ~(BUTTON_LEFT | BUTTON_RIGHT
450#if defined(BUTTON_UP) && defined(BUTTON_DOWN) 450#if defined(BUTTON_UP) && defined(BUTTON_DOWN)
451 | BUTTON_UP | BUTTON_DOWN 451 | BUTTON_UP | BUTTON_DOWN
@@ -503,7 +503,7 @@ static int button_flip(int button)
503 if (button & BUTTON_PREV) 503 if (button & BUTTON_PREV)
504 newbutton |= BUTTON_NEXT; 504 newbutton |= BUTTON_NEXT;
505#endif 505#endif
506 506#endif /* !SIMULATOR */
507 return newbutton; 507 return newbutton;
508} 508}
509 509
@@ -523,7 +523,6 @@ void button_set_flip(bool flip)
523 } 523 }
524} 524}
525#endif /* HAVE_LCD_FLIP */ 525#endif /* HAVE_LCD_FLIP */
526#endif /* SIMULATOR */
527 526
528#ifdef HAVE_BACKLIGHT 527#ifdef HAVE_BACKLIGHT
529void set_backlight_filter_keypress(bool value) 528void set_backlight_filter_keypress(bool value)