summaryrefslogtreecommitdiff
path: root/apps/wps-display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r--apps/wps-display.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 42c4759831..e6cf65a260 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -42,6 +42,7 @@
42#include "lang.h" 42#include "lang.h"
43#include "powermgmt.h" 43#include "powermgmt.h"
44#include "sprintf.h" 44#include "sprintf.h"
45#include "backlight.h"
45 46
46#ifdef HAVE_LCD_BITMAP 47#ifdef HAVE_LCD_BITMAP
47#include "icons.h" 48#include "icons.h"
@@ -768,6 +769,21 @@ bool wps_refresh(struct mp3entry* id3, int ffwd_offset, unsigned char refresh_mo
768 peak_meter_enabled = enable_pm; 769 peak_meter_enabled = enable_pm;
769#endif 770#endif
770 771
772#ifndef SIMULATOR
773 if (global_settings.caption_backlight && id3) {
774 /* turn on backlight n seconds before track ends, and turn it off n
775 seconds into the new track. n == backlight_timeout, or 5s */
776 int n =
777 backlight_timeout_value[global_settings.backlight_timeout] * 1000;
778
779 if ( n < 1000 )
780 n = 5000; /* use 5s if backlight is always on or off */
781
782 if ((id3->elapsed < 1000) ||
783 ((id3->length - id3->elapsed) < (unsigned)n))
784 backlight_on();
785 }
786#endif
771 return true; 787 return true;
772} 788}
773 789