summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/helper.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-11-29 23:55:58 +0000
committerJens Arnold <amiconn@rockbox.org>2007-11-29 23:55:58 +0000
commitbf2a33485fc99d83ef74c261d092f6b95e040a37 (patch)
tree5e387a4f9306d0a91814e98ca6f4c3ff920c8567 /apps/plugins/lib/helper.c
parentfeb75d43c8e06430d90b3d53478884c80fb7305a (diff)
downloadrockbox-bf2a33485fc99d83ef74c261d092f6b95e040a37.zip
rockbox-bf2a33485fc99d83ef74c261d092f6b95e040a37.tar.gz
rockbox-bf2a33485fc99d83ef74c261d092f6b95e040a37.tar.bz2
rockbox-bf2a33485fc99d83ef74c261d092f6b95e040a37.tar.xz
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
Diffstat (limited to 'apps/plugins/lib/helper.c')
-rw-r--r--apps/plugins/lib/helper.c56
1 files changed, 37 insertions, 19 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index 0151a36..2feff14 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -19,37 +19,55 @@
#include "plugin.h"
-/*
- * force the backlight on
- * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
- * build and makes modded targets easier to update
- */
+/* Force the backlight on */
void backlight_force_on(struct plugin_api* rb)
{
- if(!rb) return;
-/* #ifdef HAVE_BACKLIGHT */
+ if(!rb)
+ return;
if (rb->global_settings->backlight_timeout > 0)
rb->backlight_set_timeout(0);
#if CONFIG_CHARGING
if (rb->global_settings->backlight_timeout_plugged > 0)
rb->backlight_set_timeout_plugged(0);
#endif /* CONFIG_CHARGING */
-/* #endif */ /* HAVE_BACKLIGHT */
-}
+}
-/*
- * reset backlight operation to its settings
- * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
- * build and makes modded targets easier to update
- */
+/* Reset backlight operation to its settings */
void backlight_use_settings(struct plugin_api* rb)
{
- if(!rb) return;
-/* #ifdef HAVE_BACKLIGHT */
+ if (!rb)
+ return;
rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
#if CONFIG_CHARGING
- rb->backlight_set_timeout_plugged(rb->global_settings-> \
- backlight_timeout_plugged);
+ rb->backlight_set_timeout_plugged(rb->global_settings->
+ backlight_timeout_plugged);
+#endif /* CONFIG_CHARGING */
+}
+
+#ifdef HAVE_REMOTE_LCD
+/* Force the backlight on */
+void remote_backlight_force_on(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ if (rb->global_settings->remote_backlight_timeout > 0)
+ rb->remote_backlight_set_timeout(0);
+#if CONFIG_CHARGING
+ if (rb->global_settings->remote_backlight_timeout_plugged > 0)
+ rb->remote_backlight_set_timeout_plugged(0);
+#endif /* CONFIG_CHARGING */
+}
+
+/* Reset backlight operation to its settings */
+void remote_backlight_use_settings(struct plugin_api* rb)
+{
+ if (!rb)
+ return;
+ rb->remote_backlight_set_timeout(rb->global_settings->
+ remote_backlight_timeout);
+#if CONFIG_CHARGING
+ rb->remote_backlight_set_timeout_plugged(rb->global_settings->
+ remote_backlight_timeout_plugged);
#endif /* CONFIG_CHARGING */
-/* #endif */ /* HAVE_BACKLIGHT */
}
+#endif /* HAVE_REMOTE_LCD */