diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-15 12:42:09 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-15 12:42:09 +0000 |
commit | cb53e3cef44ec214836b9545a748cf5b84bec3ad (patch) | |
tree | ec78d20fec3be9bb00c4f13c166a972a4d689ff0 | |
parent | f2b5c292341768aa6ff954e4b0a817e877c66a12 (diff) | |
download | rockbox-cb53e3cef44ec214836b9545a748cf5b84bec3ad.tar.gz rockbox-cb53e3cef44ec214836b9545a748cf5b84bec3ad.zip |
Bring mpegplayer backlight fix to the other plugins, this also fixes some wrongly ifdef'd backlight calls.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14352 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/brickmania.c | 9 | ||||
-rw-r--r-- | apps/plugins/chopper.c | 10 | ||||
-rw-r--r-- | apps/plugins/credits.c | 7 | ||||
-rw-r--r-- | apps/plugins/fire.c | 8 | ||||
-rw-r--r-- | apps/plugins/fireworks.c | 6 | ||||
-rw-r--r-- | apps/plugins/grayscale.c | 9 | ||||
-rw-r--r-- | apps/plugins/invadrox.c | 9 | ||||
-rw-r--r-- | apps/plugins/jpeg.c | 17 | ||||
-rw-r--r-- | apps/plugins/lib/helper.c | 14 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 6 | ||||
-rw-r--r-- | apps/plugins/oscilloscope.c | 13 | ||||
-rw-r--r-- | apps/plugins/plasma.c | 8 | ||||
-rw-r--r-- | apps/plugins/rockblox.c | 17 | ||||
-rw-r--r-- | apps/plugins/spacerocks.c | 9 | ||||
-rw-r--r-- | apps/plugins/starfield.c | 8 | ||||
-rw-r--r-- | apps/plugins/test_disk.c | 9 | ||||
-rw-r--r-- | apps/plugins/video.c | 9 | ||||
-rw-r--r-- | apps/plugins/wormlet.c | 10 | ||||
-rw-r--r-- | apps/plugins/xobox.c | 9 |
19 files changed, 100 insertions, 87 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index cc19519151..2530cfc618 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -19,6 +19,7 @@ #include "plugin.h" #include "configfile.h" /* Part of libplugin */ +#include "helper.h" PLUGIN_HEADER @@ -2029,9 +2030,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); #endif - /* Permanently enable the backlight (unless the user has turned it off) */ - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ /* now go ahead and have fun! */ while (game_loop()!=1); @@ -2040,7 +2040,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* Restore user's original backlight setting */ rb->lcd_setfont(FONT_UI); - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return PLUGIN_OK; } diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 51bd7a894f..43b076d763 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -21,6 +21,7 @@ #include "plugin.h" #include "xlcd.h" #include "configfile.h" +#include "helper.h" PLUGIN_HEADER @@ -947,9 +948,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_set_foreground(LCD_WHITE); #endif - /* Permanently enable the backlight (unless the user has turned it off) */ - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ rb->srand( *rb->current_tick ); @@ -962,9 +962,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) configfile_save(CFG_FILE, config, 1, 0); - /* Restore user's original backlight setting */ rb->lcd_setfont(FONT_UI); - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return ret; } diff --git a/apps/plugins/credits.c b/apps/plugins/credits.c index fc0082bf41..204c250a89 100644 --- a/apps/plugins/credits.c +++ b/apps/plugins/credits.c @@ -17,6 +17,7 @@ * ****************************************************************************/ #include "plugin.h" +#include "helper.h" PLUGIN_HEADER @@ -36,7 +37,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; /* Turn off backlight timeout */ - rb->backlight_set_timeout(1); + backlight_force_on(); /* backlight control in lib/helper.c */ rb->show_logo(); #ifdef HAVE_LCD_CHARCELLS @@ -55,8 +56,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) roll_credits(); end_of_proc: - /* Restore the values we've changed */ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return PLUGIN_OK; } diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c index 59e8396f88..3cfd1abd51 100644 --- a/apps/plugins/fire.c +++ b/apps/plugins/fire.c @@ -20,6 +20,7 @@ ****************************************************************************/ #include "plugin.h" +#include "helper.h" #ifdef HAVE_LCD_BITMAP /* and also not for the Player */ #ifndef HAVE_LCD_COLOR @@ -330,7 +331,8 @@ void cleanup(void *parameter) #ifndef HAVE_LCD_COLOR gray_release(); #endif - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ } /* @@ -420,8 +422,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); #endif - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1);/* keep the light on */ + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ ret = main(); diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c index dbfe290ac8..7e3aea4ef7 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c @@ -18,6 +18,7 @@ ****************************************************************************/ #include "plugin.h" #include "oldmenuapi.h" +#include "helper.h" PLUGIN_HEADER @@ -379,7 +380,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) /* set everything up.. no BL timeout, no backdrop, white-text-on-black-background. */ - rb->backlight_set_timeout(1); + backlight_force_on(); /* backlight control in lib/helper.c */ #if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); rb->lcd_set_background(LCD_BLACK); @@ -535,7 +536,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) break; } } - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(true); diff --git a/apps/plugins/grayscale.c b/apps/plugins/grayscale.c index 5e5002067f..d28237da31 100644 --- a/apps/plugins/grayscale.c +++ b/apps/plugins/grayscale.c @@ -20,6 +20,7 @@ ****************************************************************************/ #include "plugin.h" +#include "helper.h" #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #include "gray.h" @@ -85,8 +86,8 @@ void cleanup(void *parameter) (void)parameter; gray_release(); /* switch off overlay and deinitialize */ - /* restore normal backlight setting */ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ } /* this is only a demo of what the framework can do */ @@ -170,8 +171,8 @@ int main(void) 110,110,110,110,110,110,110 }; - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); /* keep the light on */ + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ rb->lcd_setfont(FONT_SYSFIXED); /* select default font */ diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c index aa2cf0d2bd..264d5725dd 100644 --- a/apps/plugins/invadrox.c +++ b/apps/plugins/invadrox.c @@ -25,6 +25,7 @@ #include "plugin.h" #include "highscore.h" +#include "helper.h" PLUGIN_HEADER @@ -1764,9 +1765,8 @@ enum plugin_status plugin_start(struct plugin_api* api, UNUSED void* parameter) rb = api; rb->lcd_setfont(FONT_SYSFIXED); - /* Permanently enable the backlight (unless the user has turned it off) */ - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ /* now go ahead and have fun! */ game_loop(); @@ -1783,7 +1783,8 @@ enum plugin_status plugin_start(struct plugin_api* api, UNUSED void* parameter) /* Restore user's original backlight setting */ rb->lcd_setfont(FONT_UI); - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return PLUGIN_OK; } diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 0af577cfe7..b4f85f5a16 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c @@ -27,6 +27,7 @@ #include "plugin.h" #include "playback_control.h" #include "oldmenuapi.h" +#include "helper.h" #ifdef HAVE_LCD_BITMAP #include "gray.h" @@ -3309,14 +3310,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) buf_images = buf; buf_images_size = buf_size; - /* make sure the backlight is always on when viewing pictures - (actually it should also set the timeout when plugged in, - but the function backlight_set_timeout_plugged is not - available in plugins) */ -#ifdef HAVE_BACKLIGHT - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); -#endif + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ do { @@ -3339,10 +3334,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->ata_spindown(rb->global_settings->disk_spindown); #endif -#ifdef HAVE_BACKLIGHT - /* reset backlight settings */ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); -#endif + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ #ifdef USEGSLIB gray_release(); /* deinitialize */ diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index b2b0582721..2149b935bf 100644 --- a/apps/plugins/lib/helper.c +++ b/apps/plugins/lib/helper.c @@ -26,11 +26,13 @@ extern struct plugin_api* rb; void backlight_force_on(void) { #ifdef HAVE_BACKLIGHT - rb->backlight_set_timeout(1); + if (rb->global_settings->backlight_timeout > 1) + rb->backlight_set_timeout(1); #if CONFIG_CHARGING - rb->backlight_set_timeout_plugged(1); -#endif -#endif + if (rb->global_settings->backlight_timeout_plugged > 1) + rb->backlight_set_timeout_plugged(1); +#endif /* CONFIG_CHARGING */ +#endif /* HAVE_BACKLIGHT */ } /* reset backlight operation to its settings */ @@ -41,6 +43,6 @@ void backlight_use_settings(void) #if CONFIG_CHARGING rb->backlight_set_timeout_plugged(rb->global_settings-> \ backlight_timeout_plugged); -#endif -#endif +#endif /* CONFIG_CHARGING */ +#endif /* HAVE_BACKLIGHT */ } diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index f4da970606..dc1b753569 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -1857,7 +1857,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_clear_display(); rb->lcd_update(); - backlight_force_on(); + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(true); @@ -1994,7 +1995,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->pcm_set_frequency(HW_SAMPR_DEFAULT); - backlight_use_settings(); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return status; } diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c index 3291580df6..6ef398a520 100644 --- a/apps/plugins/oscilloscope.c +++ b/apps/plugins/oscilloscope.c @@ -20,6 +20,7 @@ ****************************************************************************/ #include "plugin.h" +#include "helper.h" #ifdef HAVE_LCD_BITMAP #include "xlcd.h" @@ -562,9 +563,8 @@ void cleanup(void *parameter) rb->lcd_set_foreground(LCD_DEFAULT_FG); rb->lcd_set_background(LCD_DEFAULT_BG); #endif -#ifdef HAVE_LCD_COLOR - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); -#endif + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ } enum plugin_status plugin_start(struct plugin_api* api, void* parameter) @@ -593,9 +593,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_clear_display(); rb->lcd_update(); #endif -#ifdef HAVE_LCD_COLOR - rb->backlight_set_timeout(1); /* keep the light on */ -#endif + + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ + rb->lcd_getstringsize("A", NULL, &font_height); while (!exit) diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index 64d73a3757..5de9b90908 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c @@ -23,6 +23,7 @@ ****************************************************************************/ #include "plugin.h" +#include "helper.h" #ifdef HAVE_LCD_BITMAP @@ -170,7 +171,8 @@ void cleanup(void *parameter) #ifndef HAVE_LCD_COLOR gray_release(); #endif - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ } /* @@ -299,8 +301,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) #if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); #endif - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1);/* keep the light on */ + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ ret = main(); diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 1aafe5faf7..4ce95b89d5 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -21,6 +21,7 @@ #include "plugin.h" #include "highscore.h" #include "playergfx.h" +#include "helper.h" PLUGIN_HEADER @@ -853,17 +854,14 @@ static int rockblox_loop (void) while (1) { #ifdef HAS_BUTTON_HOLD if (rb->button_hold ()) { - /* Restore user's original backlight setting */ - rb->backlight_set_timeout (rb->global_settings->backlight_timeout); - + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ rb->splash(0, "Paused"); while (rb->button_hold ()) rb->sleep(HZ/10); - /* Permanently enable the backlight (unless the user has - turned it off) */ - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout (1); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ /* get rid of the splash text */ rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); @@ -1031,9 +1029,8 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter) return PLUGIN_OK; } #endif - /* Permanently enable the backlight (unless the user has turned it off) */ - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout (1); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ init_rockblox (); ret = rockblox_loop (); diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index 075f335af7..5d285a4ada 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c @@ -20,6 +20,8 @@ #include "plugin.h" #include "math.h" #include "stdio.h" +#include "helper.h" + PLUGIN_HEADER /******************************* Globals ***********************************/ @@ -1935,13 +1937,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_set_backdrop(NULL); #endif rb->lcd_setfont(FONT_SYSFIXED); - rb->backlight_set_timeout(1); + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ iohiscore(); retval = start_game(); iohiscore(); rb->lcd_setfont(FONT_UI); - /* restore normal backlight setting*/ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return retval; } diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c index 7c1613cc2f..397c542e66 100644 --- a/apps/plugins/starfield.c +++ b/apps/plugins/starfield.c @@ -16,6 +16,7 @@ ****************************************************************************/ #include "plugin.h" +#include "helper.h" #ifdef HAVE_LCD_BITMAP /* and also not for the Player */ @@ -364,7 +365,8 @@ int plugin_main(void) #endif case(STARFIELD_QUIT): case(SYS_USB_CONNECTED): - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c*/ return PLUGIN_OK; break; } @@ -379,8 +381,8 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; /* copy to global api pointer */ (void)parameter; - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1);/* keep the light on */ + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ ret = plugin_main(); diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 45dc598fc2..2f06177764 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c @@ -19,6 +19,7 @@ #include "plugin.h" #include "oldmenuapi.h" +#include "helper.h" PLUGIN_HEADER @@ -437,16 +438,16 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->srand(*rb->current_tick); - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); /* keep the light on */ + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ m = menu_init(rb, items, sizeof(items) / sizeof(*items), NULL, NULL, NULL, NULL); menu_run(m); menu_exit(m); - /* restore normal backlight setting */ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ rb->rmdir(testbasedir); diff --git a/apps/plugins/video.c b/apps/plugins/video.c index aca960f56e..5ebe8dc2e6 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c @@ -27,6 +27,7 @@ #include "plugin.h" #include "sh7034.h" #include "system.h" +#include "helper.h" #ifndef SIMULATOR /* not for simulator by now */ #ifdef HAVE_LCD_BITMAP /* and definitely not for the Player, haha */ @@ -559,8 +560,8 @@ void Cleanup(void *fd) if (gPlay.bHasAudio) rb->mp3_play_stop(); /* stop audio ISR */ - /* restore normal backlight setting */ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ /* restore normal contrast */ rb->lcd_set_contrast(rb->global_settings->contrast); @@ -924,8 +925,8 @@ int main(char* filename) if (gFileHdr.video_format == VIDEOFORMAT_RAW) { gPlay.bHasVideo = true; - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); /* keep the light on */ + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ } /* prepare audio playback, if contained */ diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 6abcc43db1..a2abdba13a 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -18,6 +18,7 @@ ****************************************************************************/ #include "plugin.h" #include "configfile.h" +#include "helper.h" PLUGIN_HEADER @@ -2332,9 +2333,8 @@ bool launch_wormlet(void) rb->lcd_clear_display(); - /* Permanently enable the backlight (unless the user has turned it off) */ - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ /* start the game */ while (game_result == 1) @@ -2343,8 +2343,8 @@ bool launch_wormlet(void) switch (game_result) { case 2: - /* Restore user's original backlight setting */ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return false; break; } diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 616a45605f..9a112aa5eb 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -19,6 +19,7 @@ ****************************************************************************/ #include "plugin.h" +#include "helper.h" PLUGIN_HEADER @@ -932,9 +933,8 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter) rb->lcd_set_backdrop(NULL); #endif - /* Permanently enable the backlight (unless the user has turned it off) */ - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout (1); + /* Turn off backlight timeout */ + backlight_force_on(); /* backlight control in lib/helper.c */ quit = false; @@ -944,7 +944,8 @@ enum plugin_status plugin_start (struct plugin_api *api, void *parameter) ret = xobox_loop (); } - rb->backlight_set_timeout (rb->global_settings->backlight_timeout); + /* Turn on backlight timeout (revert to settings) */ + backlight_use_settings(); /* backlight control in lib/helper.c */ rb->lcd_setfont (FONT_UI); return ret; |