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 | |
| parent | 735ab889d2bd41fdc8a5bf22d7ce5ed724d58474 (diff) | |
| download | rockbox-767c0ec5894f1acaad5e0def12d628c6f21bcf87.zip rockbox-767c0ec5894f1acaad5e0def12d628c6f21bcf87.tar.gz rockbox-767c0ec5894f1acaad5e0def12d628c6f21bcf87.tar.bz2 rockbox-767c0ec5894f1acaad5e0def12d628c6f21bcf87.tar.xz | |
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.c | 9 | ||||
| -rw-r--r-- | apps/plugins/lib/helper.h | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index 42c9dec..65108ce 100644 --- a/apps/plugins/lib/helper.c +++ b/apps/plugins/lib/helper.c @@ -19,16 +19,14 @@ #include "plugin.h" -/* the plugin must declare the plugin_api struct pointer itself */ -extern struct plugin_api* rb; - /* * force the backlight on * now enabled regardless of HAVE_BACKLIGHT because it is not needed to * build and makes modded targets easier to update */ -void backlight_force_on(void) +void backlight_force_on(struct plugin_api* rb) { + if(!rb) return; /* #ifdef HAVE_BACKLIGHT */ if (rb->global_settings->backlight_timeout > 1) rb->backlight_set_timeout(1); @@ -44,8 +42,9 @@ void backlight_force_on(void) * now enabled regardless of HAVE_BACKLIGHT because it is not needed to * build and makes modded targets easier to update */ -void backlight_use_settings(void) +void backlight_use_settings(struct plugin_api* rb) { + if(!rb) return; /* #ifdef HAVE_BACKLIGHT */ rb->backlight_set_timeout(rb->global_settings->backlight_timeout); #if CONFIG_CHARGING diff --git a/apps/plugins/lib/helper.h b/apps/plugins/lib/helper.h index 71a6708..f2f5f87 100644 --- a/apps/plugins/lib/helper.h +++ b/apps/plugins/lib/helper.h @@ -24,7 +24,7 @@ /** * Backlight on/off operations */ -void backlight_force_on(void); -void backlight_use_settings(void); +void backlight_force_on(struct plugin_api* rb); +void backlight_use_settings(struct plugin_api* rb); #endif |