From 21a373388833b8f4f7284cff16d48cab7857de2f Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Thu, 8 May 2008 21:23:31 +0000 Subject: Lamp plugin: accept the reduced patch of FS #8934 by Alexander Papst git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17425 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/helper.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'apps/plugins/lib/helper.c') diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index 3af60b5473..8ac822b407 100644 --- a/apps/plugins/lib/helper.c +++ b/apps/plugins/lib/helper.c @@ -72,3 +72,22 @@ void remote_backlight_use_settings(struct plugin_api* rb) #endif /* CONFIG_CHARGING */ } #endif /* HAVE_REMOTE_LCD */ + +#ifdef HAVE_BUTTON_LIGHT +/* Force the buttonlight on */ +void buttonlight_force_on(struct plugin_api* rb) +{ + if (!rb) + return; + if (rb->global_settings->buttonlight_timeout > 0) + rb->buttonlight_set_timeout(0); +} + +/* Reset buttonlight operation to its settings */ +void buttonlight_use_settings(struct plugin_api* rb) +{ + if (!rb) + return; + rb->buttonlight_set_timeout(rb->global_settings->buttonlight_timeout); +} +#endif /* HAVE_BUTTON_LIGHT */ -- cgit v1.2.3