summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2007-08-15 12:42:09 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2007-08-15 12:42:09 +0000
commitcb53e3cef44ec214836b9545a748cf5b84bec3ad (patch)
treeec78d20fec3be9bb00c4f13c166a972a4d689ff0 /apps/plugins/lib
parentf2b5c292341768aa6ff954e4b0a817e877c66a12 (diff)
downloadrockbox-cb53e3cef44ec214836b9545a748cf5b84bec3ad.zip
rockbox-cb53e3cef44ec214836b9545a748cf5b84bec3ad.tar.gz
rockbox-cb53e3cef44ec214836b9545a748cf5b84bec3ad.tar.bz2
rockbox-cb53e3cef44ec214836b9545a748cf5b84bec3ad.tar.xz
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
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/helper.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index b2b0582..2149b93 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 */
}