Index: apps/gui/gwps-common.c =================================================================== --- apps/gui/gwps-common.c (Revision 17564) +++ apps/gui/gwps-common.c (Arbeitskopie) @@ -1939,6 +1939,7 @@ align.right = NULL; bool update_line, new_subline_refresh; + bool caption = false; #ifdef HAVE_LCD_BITMAP gui_wps_statusbar_draw(gwps, true); @@ -1979,6 +1980,61 @@ return false; } +#ifdef HAVE_BACKLIGHT + if (global_settings.caption_backlight && state->id3) + { + /* turn on backlight n seconds before track ends, and turn it off n + seconds into the new track. n == backlight_timeout, or 5s */ + int n = global_settings.backlight_timeout * 1000; + + if ( n < 1000 ) + n = 5000; /* use 5s if backlight is always on or off */ + + if (((state->id3->elapsed < 1000) || + ((state->id3->length - state->id3->elapsed) < (unsigned)n)) && + (state->paused == false)) + { + backlight_on(); + caption = true; + } + } +#endif +#ifdef HAVE_REMOTE_LCD + if (global_settings.remote_caption_backlight && state->id3) + { + /* turn on remote backlight n seconds before track ends, and turn it + off n seconds into the new track. n == remote_backlight_timeout, + or 5s */ + int n = global_settings.remote_backlight_timeout * 1000; + + if ( n < 1000 ) + n = 5000; /* use 5s if backlight is always on or off */ + + if (((state->id3->elapsed < 1000) || + ((state->id3->length - state->id3->elapsed) < (unsigned)n)) && + (state->paused == false)) + { + remote_backlight_on(); + caption = true; + } + } +#endif + + /* For some targets, the display is unreadable if the backlight is off. + * If so, only render the WPS if the backlight is (about to be) turned + * on. + */ +#if defined(HAVE_BACKLIGHT) && (defined(NEED_BACKLIGHT)) + if (!(caption || is_backlight_on(false) +#if defined(HAVE_REMOTE_LCD) + || is_remote_backlight_on() +#endif + )) + { + return true; + } +#endif + state->ff_rewind_count = ffwd_offset; for (v = 0; v < data->num_viewports; v++) @@ -2092,40 +2148,6 @@ display->update(); -#ifdef HAVE_BACKLIGHT - if (global_settings.caption_backlight && state->id3) - { - /* turn on backlight n seconds before track ends, and turn it off n - seconds into the new track. n == backlight_timeout, or 5s */ - int n = global_settings.backlight_timeout * 1000; - - if ( n < 1000 ) - n = 5000; /* use 5s if backlight is always on or off */ - - if (((state->id3->elapsed < 1000) || - ((state->id3->length - state->id3->elapsed) < (unsigned)n)) && - (state->paused == false)) - backlight_on(); - } -#endif -#ifdef HAVE_REMOTE_LCD - if (global_settings.remote_caption_backlight && state->id3) - { - /* turn on remote backlight n seconds before track ends, and turn it - off n seconds into the new track. n == remote_backlight_timeout, - or 5s */ - int n = global_settings.remote_backlight_timeout * 1000; - - if ( n < 1000 ) - n = 5000; /* use 5s if backlight is always on or off */ - - if (((state->id3->elapsed < 1000) || - ((state->id3->length - state->id3->elapsed) < (unsigned)n)) && - (state->paused == false)) - remote_backlight_on(); - } -#endif - return true; } Index: firmware/export/config-h10.h =================================================================== --- firmware/export/config-h10.h (Revision 17564) +++ firmware/export/config-h10.h (Arbeitskopie) @@ -101,6 +101,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define AB_REPEAT_ENABLE 1 #define BATTERY_CAPACITY_DEFAULT 1550 /* default battery capacity */ Index: firmware/export/config-player.h =================================================================== --- firmware/export/config-player.h (Revision 17564) +++ firmware/export/config-player.h (Arbeitskopie) @@ -30,6 +30,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */ #define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */ #define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */ Index: firmware/export/config-c200.h =================================================================== --- firmware/export/config-c200.h (Revision 17564) +++ firmware/export/config-c200.h (Arbeitskopie) @@ -111,6 +111,9 @@ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* define this if you have a flash memory storage */ #define HAVE_FLASH_STORAGE Index: firmware/export/config-iaudiom3.h =================================================================== --- firmware/export/config-iaudiom3.h (Revision 17564) +++ firmware/export/config-iaudiom3.h (Arbeitskopie) @@ -69,6 +69,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF Index: firmware/export/config-ondiofm.h =================================================================== --- firmware/export/config-ondiofm.h (Revision 17564) +++ firmware/export/config-ondiofm.h (Arbeitskopie) @@ -46,6 +46,9 @@ /* Enable this if you have done the backlight mod */ //#define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* define this if you have a flash memory storage */ #define HAVE_FLASH_STORAGE Index: firmware/export/config-creativezvm.h =================================================================== --- firmware/export/config-creativezvm.h (Revision 17564) +++ firmware/export/config-creativezvm.h (Arbeitskopie) @@ -86,6 +86,9 @@ //#define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Main LCD backlight brightness range and defaults */ //#define MIN_BRIGHTNESS_SETTING 0 //#define MAX_BRIGHTNESS_SETTING 127 Index: firmware/export/config-ifp7xx.h =================================================================== --- firmware/export/config-ifp7xx.h (Revision 17564) +++ firmware/export/config-ifp7xx.h (Arbeitskopie) @@ -85,6 +85,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this to the CPU frequency */ #define CPU_FREQ 48000000 Index: firmware/export/config-mrobe100.h =================================================================== --- firmware/export/config-mrobe100.h (Revision 17564) +++ firmware/export/config-mrobe100.h (Arbeitskopie) @@ -64,6 +64,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* We can fade the backlight by using PWM */ #define HAVE_BACKLIGHT_PWM_FADING Index: firmware/export/config-mrobe500.h =================================================================== --- firmware/export/config-mrobe500.h (Revision 17564) +++ firmware/export/config-mrobe500.h (Arbeitskopie) @@ -96,6 +96,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define HAVE_BACKLIGHT_BRIGHTNESS /* Main LCD backlight brightness range and defaults */ Index: firmware/export/config-e200.h =================================================================== --- firmware/export/config-e200.h (Revision 17564) +++ firmware/export/config-e200.h (Arbeitskopie) @@ -101,6 +101,9 @@ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +#define NEED_BACKLIGHT + /* define this if the unit uses a scrollwheel for navigation */ #define HAVE_SCROLLWHEEL /* define from which rotation speed [degree/sec] on the acceleration starts */ Index: firmware/export/config-m200.h =================================================================== --- firmware/export/config-m200.h (Revision 17564) +++ firmware/export/config-m200.h (Arbeitskopie) @@ -69,6 +69,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define CONFIG_I2C I2C_TCC77X #define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */ Index: firmware/export/config-ipodvideo.h =================================================================== --- firmware/export/config-ipodvideo.h (Revision 17564) +++ firmware/export/config-ipodvideo.h (Arbeitskopie) @@ -80,6 +80,9 @@ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Main LCD backlight brightness range and defaults */ #define MIN_BRIGHTNESS_SETTING 1 #define MAX_BRIGHTNESS_SETTING 32 Index: firmware/export/config-ipod3g.h =================================================================== --- firmware/export/config-ipod3g.h (Revision 17564) +++ firmware/export/config-ipod3g.h (Arbeitskopie) @@ -84,6 +84,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this if you can detect headphones */ #define HAVE_HEADPHONE_DETECTION Index: firmware/export/config-h10_5gb.h =================================================================== --- firmware/export/config-h10_5gb.h (Revision 17564) +++ firmware/export/config-h10_5gb.h (Arbeitskopie) @@ -84,6 +84,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define AB_REPEAT_ENABLE 1 #define BATTERY_CAPACITY_DEFAULT 820 /* default battery capacity */ Index: firmware/export/config-ipodcolor.h =================================================================== --- firmware/export/config-ipodcolor.h (Revision 17564) +++ firmware/export/config-ipodcolor.h (Arbeitskopie) @@ -79,6 +79,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* define this if the unit uses a scrollwheel for navigation */ #define HAVE_SCROLLWHEEL /* define from which rotation speed [degree/sec] on the acceleration starts */ Index: firmware/export/config-ipodmini.h =================================================================== --- firmware/export/config-ipodmini.h (Revision 17564) +++ firmware/export/config-ipodmini.h (Arbeitskopie) @@ -86,6 +86,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* We can fade the backlight by using PWM */ #define HAVE_BACKLIGHT_PWM_FADING Index: firmware/export/config-h120.h =================================================================== --- firmware/export/config-h120.h (Revision 17564) +++ firmware/export/config-h120.h (Arbeitskopie) @@ -62,6 +62,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* We can fade the backlight by using PWM */ #define HAVE_BACKLIGHT_PWM_FADING Index: firmware/export/config-ipod1g2g.h =================================================================== --- firmware/export/config-ipod1g2g.h (Revision 17564) +++ firmware/export/config-ipod1g2g.h (Arbeitskopie) @@ -74,6 +74,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this if the backlight unverts LCD appearance */ #define HAVE_BACKLIGHT_INVERSION Index: firmware/export/config-recorderv2.h =================================================================== --- firmware/export/config-recorderv2.h (Revision 17564) +++ firmware/export/config-recorderv2.h (Arbeitskopie) @@ -58,6 +58,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define CONFIG_I2C I2C_PLAYREC #define BATTERY_CAPACITY_DEFAULT 2200 /* default battery capacity */ Index: firmware/export/config-ipodmini2g.h =================================================================== --- firmware/export/config-ipodmini2g.h (Revision 17564) +++ firmware/export/config-ipodmini2g.h (Arbeitskopie) @@ -86,6 +86,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* We can fade the backlight by using PWM */ #define HAVE_BACKLIGHT_PWM_FADING Index: firmware/export/config-ipodnano.h =================================================================== --- firmware/export/config-ipodnano.h (Revision 17564) +++ firmware/export/config-ipodnano.h (Arbeitskopie) @@ -80,6 +80,9 @@ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Main LCD backlight brightness range and defaults */ #define MIN_BRIGHTNESS_SETTING 1 #define MAX_BRIGHTNESS_SETTING 32 Index: firmware/export/config-iaudiom5.h =================================================================== --- firmware/export/config-iaudiom5.h (Revision 17564) +++ firmware/export/config-iaudiom5.h (Arbeitskopie) @@ -76,6 +76,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF Index: firmware/export/config-logikdax.h =================================================================== --- firmware/export/config-logikdax.h (Revision 17564) +++ firmware/export/config-logikdax.h (Arbeitskopie) @@ -63,6 +63,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define CONFIG_I2C I2C_TCC77X #define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */ Index: firmware/export/config-h100.h =================================================================== --- firmware/export/config-h100.h (Revision 17564) +++ firmware/export/config-h100.h (Arbeitskopie) @@ -67,6 +67,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* We can fade the backlight by using PWM */ #define HAVE_BACKLIGHT_PWM_FADING Index: firmware/export/config-h300.h =================================================================== --- firmware/export/config-h300.h (Revision 17564) +++ firmware/export/config-h300.h (Arbeitskopie) @@ -63,6 +63,9 @@ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF Index: firmware/export/config-creativezvm60gb.h =================================================================== --- firmware/export/config-creativezvm60gb.h (Revision 17564) +++ firmware/export/config-creativezvm60gb.h (Arbeitskopie) @@ -86,6 +86,9 @@ //#define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Main LCD backlight brightness range and defaults */ //#define MIN_BRIGHTNESS_SETTING 0 //#define MAX_BRIGHTNESS_SETTING 127 Index: firmware/export/config-creativezv.h =================================================================== --- firmware/export/config-creativezv.h (Revision 17564) +++ firmware/export/config-creativezv.h (Arbeitskopie) @@ -86,6 +86,9 @@ //#define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Main LCD backlight brightness range and defaults */ //#define MIN_BRIGHTNESS_SETTING 0 //#define MAX_BRIGHTNESS_SETTING 127 Index: firmware/export/config-ipod4g.h =================================================================== --- firmware/export/config-ipod4g.h (Revision 17564) +++ firmware/export/config-ipod4g.h (Arbeitskopie) @@ -92,6 +92,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* define this if the unit uses a scrollwheel for navigation */ #define HAVE_SCROLLWHEEL /* define from which rotation speed [degree/sec] on the acceleration starts */ Index: firmware/export/config-iaudiox5.h =================================================================== --- firmware/export/config-iaudiox5.h (Revision 17564) +++ firmware/export/config-iaudiox5.h (Arbeitskopie) @@ -89,6 +89,9 @@ #define HAVE_BACKLIGHT #define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF Index: firmware/export/config-tpj1022.h =================================================================== --- firmware/export/config-tpj1022.h (Revision 17564) +++ firmware/export/config-tpj1022.h (Arbeitskopie) @@ -60,6 +60,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define BATTERY_CAPACITY_DEFAULT 1550 /* default battery capacity TODO: check this, probably different for different models too */ Index: firmware/export/config-gigabeat-s.h =================================================================== --- firmware/export/config-gigabeat-s.h (Revision 17564) +++ firmware/export/config-gigabeat-s.h (Arbeitskopie) @@ -54,6 +54,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Define this if you have a software controlled poweroff */ #define HAVE_SW_POWEROFF Index: firmware/export/config-gigabeat.h =================================================================== --- firmware/export/config-gigabeat.h (Revision 17564) +++ firmware/export/config-gigabeat.h (Arbeitskopie) @@ -61,6 +61,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +#define NEED_BACKLIGHT + #define HAVE_BUTTON_LIGHT #define HAVE_BACKLIGHT_BRIGHTNESS Index: firmware/export/config-recorder.h =================================================================== --- firmware/export/config-recorder.h (Revision 17564) +++ firmware/export/config-recorder.h (Arbeitskopie) @@ -52,6 +52,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define CONFIG_I2C I2C_PLAYREC #define BATTERY_CAPACITY_DEFAULT 1500 /* default battery capacity */ Index: firmware/export/config-ondiosp.h =================================================================== --- firmware/export/config-ondiosp.h (Revision 17564) +++ firmware/export/config-ondiosp.h (Arbeitskopie) @@ -35,6 +35,9 @@ /* Enable this if you have done the backlight mod */ //#define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* define this if you have a flash memory storage */ #define HAVE_FLASH_STORAGE Index: firmware/export/config-cowond2.h =================================================================== --- firmware/export/config-cowond2.h (Revision 17564) +++ firmware/export/config-cowond2.h (Arbeitskopie) @@ -94,6 +94,9 @@ /* Enable LCD brightness control */ #define HAVE_BACKLIGHT_BRIGHTNESS +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + /* Main LCD backlight brightness range and defaults */ #define MIN_BRIGHTNESS_SETTING 1 #define MAX_BRIGHTNESS_SETTING 14 Index: firmware/export/config-fmrecorder.h =================================================================== --- firmware/export/config-fmrecorder.h (Revision 17564) +++ firmware/export/config-fmrecorder.h (Arbeitskopie) @@ -61,6 +61,9 @@ /* Define this for LCD backlight available */ #define HAVE_BACKLIGHT +/* Define this if the screen is unreadable without backlight */ +/* #define NEED_BACKLIGHT */ + #define CONFIG_I2C I2C_PLAYREC #define BATTERY_CAPACITY_DEFAULT 2200 /* default battery capacity */