From bf2a33485fc99d83ef74c261d092f6b95e040a37 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Thu, 29 Nov 2007 23:55:58 +0000 Subject: Fix some plugins not using the helper functions for the new backlight timeout handling. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15849 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/demystify.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'apps/plugins/demystify.c') diff --git a/apps/plugins/demystify.c b/apps/plugins/demystify.c index 3164eef..580783f 100644 --- a/apps/plugins/demystify.c +++ b/apps/plugins/demystify.c @@ -23,6 +23,7 @@ #ifdef HAVE_LCD_BITMAP #include "pluginlib_actions.h" +#include "helper.h" PLUGIN_HEADER #define DEFAULT_WAIT_TIME 3 @@ -255,9 +256,9 @@ void cleanup(void *parameter) { (void)parameter; - rb->screens[SCREEN_MAIN]->backlight_set_timeout(rb->global_settings->backlight_timeout); -#if NB_SCREENS==2 - rb->screens[SCREEN_REMOTE]->backlight_set_timeout(rb->global_settings->remote_backlight_timeout); + backlight_use_settings(rb); +#ifdef HAVE_REMOTE_LCD + remote_backlight_use_settings(rb); #endif } @@ -428,16 +429,14 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) int ret; rb = api; /* copy to global api pointer */ + (void)parameter; #if LCD_DEPTH > 1 rb->lcd_set_backdrop(NULL); #endif - (void)parameter; - if (rb->global_settings->backlight_timeout > 0) - { - int i; - FOR_NB_SCREENS(i) - rb->screens[i]->backlight_set_timeout(1);/* keep the light on */ - } + backlight_force_on(rb); /* backlight control in lib/helper.c */ +#ifdef HAVE_REMOTE_LCD + remote_backlight_force_on(rb); /* remote backlight control in lib/helper.c */ +#endif ret = plugin_main(); return ret; -- cgit v1.1