mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
* Rename backlight_force_on to backlight_ignore_timeout to make it clear what the function does.
* Add backlight_force_on() which forces to turn on backlight even when the setting is set to Off. use this in lamp. No functional change except lamp. See aslo FS#9883. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29128 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f06f685273
commit
01313d5039
37 changed files with 94 additions and 68 deletions
|
@ -36,8 +36,17 @@ const unsigned bit_n_table[32] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
/* Force the backlight on */
|
||||
/* Force the backlight on */
|
||||
void backlight_force_on(void)
|
||||
{
|
||||
rb->backlight_set_timeout(0);
|
||||
#if CONFIG_CHARGING
|
||||
rb->backlight_set_timeout_plugged(0);
|
||||
#endif /* CONFIG_CHARGING */
|
||||
}
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
void backlight_ignore_timeout(void)
|
||||
{
|
||||
if (rb->global_settings->backlight_timeout > 0)
|
||||
rb->backlight_set_timeout(0);
|
||||
|
@ -60,6 +69,15 @@ void backlight_use_settings(void)
|
|||
#ifdef HAVE_REMOTE_LCD
|
||||
/* Force the backlight on */
|
||||
void remote_backlight_force_on(void)
|
||||
{
|
||||
rb->remote_backlight_set_timeout(0);
|
||||
#if CONFIG_CHARGING
|
||||
rb->remote_backlight_set_timeout_plugged(0);
|
||||
#endif /* CONFIG_CHARGING */
|
||||
}
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
void remote_backlight_ignore_timeout(void)
|
||||
{
|
||||
if (rb->global_settings->remote_backlight_timeout > 0)
|
||||
rb->remote_backlight_set_timeout(0);
|
||||
|
@ -84,6 +102,12 @@ void remote_backlight_use_settings(void)
|
|||
#ifdef HAVE_BUTTON_LIGHT
|
||||
/* Force the buttonlight on */
|
||||
void buttonlight_force_on(void)
|
||||
{
|
||||
rb->buttonlight_set_timeout(0);
|
||||
}
|
||||
|
||||
/* Turn off backlight timeout */
|
||||
void buttonlight_ignore_timeout(void)
|
||||
{
|
||||
if (rb->global_settings->buttonlight_timeout > 0)
|
||||
rb->buttonlight_set_timeout(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue