summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2007-08-16 23:01:18 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2007-08-16 23:01:18 +0000
commit767c0ec5894f1acaad5e0def12d628c6f21bcf87 (patch)
treea2fbd9ac23adc395d4587a6c9cb85ba4cc001cb8 /apps/plugins/lib
parent735ab889d2bd41fdc8a5bf22d7ce5ed724d58474 (diff)
downloadrockbox-767c0ec5894f1acaad5e0def12d628c6f21bcf87.tar.gz
rockbox-767c0ec5894f1acaad5e0def12d628c6f21bcf87.zip
Pass plugin api pointer to funtion directly, fixes crashes when doing incremental builds. Fix incorrect backlight changes in rockblox introduced recently.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14373 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/helper.c9
-rw-r--r--apps/plugins/lib/helper.h4
2 files changed, 6 insertions, 7 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index 42c9deca70..65108cec8f 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -19,16 +19,14 @@
19 19
20#include "plugin.h" 20#include "plugin.h"
21 21
22/* the plugin must declare the plugin_api struct pointer itself */
23extern struct plugin_api* rb;
24
25/* 22/*
26 * force the backlight on 23 * force the backlight on
27 * now enabled regardless of HAVE_BACKLIGHT because it is not needed to 24 * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
28 * build and makes modded targets easier to update 25 * build and makes modded targets easier to update
29 */ 26 */
30void backlight_force_on(void) 27void backlight_force_on(struct plugin_api* rb)
31{ 28{
29 if(!rb) return;
32/* #ifdef HAVE_BACKLIGHT */ 30/* #ifdef HAVE_BACKLIGHT */
33 if (rb->global_settings->backlight_timeout > 1) 31 if (rb->global_settings->backlight_timeout > 1)
34 rb->backlight_set_timeout(1); 32 rb->backlight_set_timeout(1);
@@ -44,8 +42,9 @@ void backlight_force_on(void)
44 * now enabled regardless of HAVE_BACKLIGHT because it is not needed to 42 * now enabled regardless of HAVE_BACKLIGHT because it is not needed to
45 * build and makes modded targets easier to update 43 * build and makes modded targets easier to update
46 */ 44 */
47void backlight_use_settings(void) 45void backlight_use_settings(struct plugin_api* rb)
48{ 46{
47 if(!rb) return;
49/* #ifdef HAVE_BACKLIGHT */ 48/* #ifdef HAVE_BACKLIGHT */
50 rb->backlight_set_timeout(rb->global_settings->backlight_timeout); 49 rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
51#if CONFIG_CHARGING 50#if CONFIG_CHARGING
diff --git a/apps/plugins/lib/helper.h b/apps/plugins/lib/helper.h
index 71a670884e..f2f5f8761b 100644
--- a/apps/plugins/lib/helper.h
+++ b/apps/plugins/lib/helper.h
@@ -24,7 +24,7 @@
24/** 24/**
25 * Backlight on/off operations 25 * Backlight on/off operations
26 */ 26 */
27void backlight_force_on(void); 27void backlight_force_on(struct plugin_api* rb);
28void backlight_use_settings(void); 28void backlight_use_settings(struct plugin_api* rb);
29 29
30#endif 30#endif