Patch #4934 by Ralf Herz: Fixes
1) Backlight stays on when set to always off (at least on the iPods (signed/unsigned problem)) 2) Buttons not working when the backlight is set to always off and turned on the "first keypress enables backlight only" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9396 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
42c8e5c769
commit
8c15138008
|
@ -137,7 +137,7 @@ static inline void __backlight_off(void)
|
|||
|
||||
#if defined(CONFIG_BACKLIGHT) && !defined(BOOTLOADER)
|
||||
|
||||
const char backlight_timeout_value[19] =
|
||||
const signed char backlight_timeout_value[19] =
|
||||
{
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 45, 60, 90
|
||||
};
|
||||
|
@ -522,9 +522,10 @@ void backlight_off(void)
|
|||
queue_post(&backlight_queue, BACKLIGHT_OFF, NULL);
|
||||
}
|
||||
|
||||
/* returns true when the backlight is on OR when it's set to always off */
|
||||
bool is_backlight_on(void)
|
||||
{
|
||||
if (backlight_timer || !backlight_get_current_timeout())
|
||||
if (backlight_timer || backlight_get_current_timeout() <= 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -615,9 +616,11 @@ int remote_backlight_get_current_timeout(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
/* returns true when the backlight is on OR when it's set to always off */
|
||||
bool is_remote_backlight_on(void)
|
||||
{
|
||||
if (remote_backlight_timer != 0 || !remote_backlight_get_current_timeout())
|
||||
if (remote_backlight_timer != 0 ||
|
||||
remote_backlight_get_current_timeout() <= 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
|
|
@ -33,7 +33,7 @@ void backlight_set_fade_in(int index);
|
|||
void backlight_set_fade_out(int index);
|
||||
#endif
|
||||
void backlight_set_timeout_plugged(int index);
|
||||
extern const char backlight_timeout_value[];
|
||||
extern const signed char backlight_timeout_value[];
|
||||
#else
|
||||
#define backlight_init()
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user