1
0
Fork 0
forked from len0rd/rockbox

transflective LCDs: fix "first buttonpress enables backlight only"

This should be done even if the backlight is set to "always off",
i.e. if the LCD is sleeping, a button press should be "eaten"
and just wake up the LCD.

Change-Id: I3946bdbbdc81f23eae3f47423123cefa275e0afc
This commit is contained in:
Sebastian Leonhardt 2016-06-29 23:18:00 +02:00 committed by Solomon Peachy
parent 666405f346
commit 053c4d0593

View file

@ -41,6 +41,9 @@
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
#include "lcd-remote.h" #include "lcd-remote.h"
#endif #endif
#if defined(HAVE_TRANSFLECTIVE_LCD) && defined(HAVE_LCD_SLEEP)
#include "lcd.h" /* lcd_active() prototype */
#endif
struct event_queue button_queue SHAREDBSS_ATTR; struct event_queue button_queue SHAREDBSS_ATTR;
@ -354,7 +357,12 @@ static void button_tick(void)
} }
else else
#endif #endif
if (!filter_first_keypress || is_backlight_on(false) if (!filter_first_keypress
#if defined(HAVE_TRANSFLECTIVE_LCD) && defined(HAVE_LCD_SLEEP)
|| (is_backlight_on(false) && lcd_active())
#else
|| is_backlight_on(false)
#endif
#if BUTTON_REMOTE #if BUTTON_REMOTE
|| (btn & BUTTON_REMOTE) || (btn & BUTTON_REMOTE)
#endif #endif