From cb53e3cef44ec214836b9545a748cf5b84bec3ad Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Wed, 15 Aug 2007 12:42:09 +0000 Subject: 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 --- apps/plugins/jpeg.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'apps/plugins/jpeg.c') diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 0af577c..b4f85f5 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 */ -- cgit v1.1