diff options
Diffstat (limited to 'apps/plugins/lib')
| -rw-r--r-- | apps/plugins/lib/helper.c | 14 |
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 */ } |