diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index c2a4dff3b6..16f3a6f2cc 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -1612,12 +1612,12 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1612 | data->peak_meter_enabled = enable_pm; | 1612 | data->peak_meter_enabled = enable_pm; |
1613 | #endif | 1613 | #endif |
1614 | 1614 | ||
1615 | #if defined(CONFIG_BACKLIGHT) && !defined(SIMULATOR) | 1615 | #ifdef CONFIG_BACKLIGHT |
1616 | if (global_settings.caption_backlight && state->id3) { | 1616 | if (global_settings.caption_backlight && state->id3) { |
1617 | /* turn on backlight n seconds before track ends, and turn it off n | 1617 | /* turn on backlight n seconds before track ends, and turn it off n |
1618 | seconds into the new track. n == backlight_timeout, or 5s */ | 1618 | seconds into the new track. n == backlight_timeout, or 5s */ |
1619 | int n = | 1619 | int n = backlight_timeout_value[global_settings.backlight_timeout] |
1620 | backlight_timeout_value[global_settings.backlight_timeout] * 1000; | 1620 | * 1000; |
1621 | 1621 | ||
1622 | if ( n < 1000 ) | 1622 | if ( n < 1000 ) |
1623 | n = 5000; /* use 5s if backlight is always on or off */ | 1623 | n = 5000; /* use 5s if backlight is always on or off */ |
@@ -1627,6 +1627,22 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1627 | backlight_on(); | 1627 | backlight_on(); |
1628 | } | 1628 | } |
1629 | #endif | 1629 | #endif |
1630 | #ifdef HAVE_REMOTE_LCD | ||
1631 | if (global_settings.remote_caption_backlight && state->id3) { | ||
1632 | /* turn on remote backlight n seconds before track ends, and turn it | ||
1633 | off n seconds into the new track. n == remote_backlight_timeout, | ||
1634 | or 5s */ | ||
1635 | int n = backlight_timeout_value[global_settings.remote_backlight_timeout] | ||
1636 | * 1000; | ||
1637 | |||
1638 | if ( n < 1000 ) | ||
1639 | n = 5000; /* use 5s if backlight is always on or off */ | ||
1640 | |||
1641 | if ((state->id3->elapsed < 1000) || | ||
1642 | ((state->id3->length - state->id3->elapsed) < (unsigned)n)) | ||
1643 | remote_backlight_on(); | ||
1644 | } | ||
1645 | #endif | ||
1630 | return true; | 1646 | return true; |
1631 | } | 1647 | } |
1632 | 1648 | ||