diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-16 23:01:18 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-16 23:01:18 +0000 |
commit | 767c0ec5894f1acaad5e0def12d628c6f21bcf87 (patch) | |
tree | a2fbd9ac23adc395d4587a6c9cb85ba4cc001cb8 /apps/plugins/lib/helper.c | |
parent | 735ab889d2bd41fdc8a5bf22d7ce5ed724d58474 (diff) | |
download | rockbox-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/helper.c')
-rw-r--r-- | apps/plugins/lib/helper.c | 9 |
1 files changed, 4 insertions, 5 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 */ | ||
23 | extern 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 | */ |
30 | void backlight_force_on(void) | 27 | void 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 | */ |
47 | void backlight_use_settings(void) | 45 | void 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 |