diff options
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 |