diff options
-rw-r--r-- | apps/plugins/lib/helper.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index 2149b935bf..42c9deca70 100644 --- a/apps/plugins/lib/helper.c +++ b/apps/plugins/lib/helper.c | |||
@@ -22,27 +22,35 @@ | |||
22 | /* the plugin must declare the plugin_api struct pointer itself */ | 22 | /* the plugin must declare the plugin_api struct pointer itself */ |
23 | extern struct plugin_api* rb; | 23 | extern struct plugin_api* rb; |
24 | 24 | ||
25 | /* force the backlight on */ | 25 | /* |
26 | * force the backlight on | ||
27 | * now enabled regardless of HAVE_BACKLIGHT because it is not needed to | ||
28 | * build and makes modded targets easier to update | ||
29 | */ | ||
26 | void backlight_force_on(void) | 30 | void backlight_force_on(void) |
27 | { | 31 | { |
28 | #ifdef HAVE_BACKLIGHT | 32 | /* #ifdef HAVE_BACKLIGHT */ |
29 | if (rb->global_settings->backlight_timeout > 1) | 33 | if (rb->global_settings->backlight_timeout > 1) |
30 | rb->backlight_set_timeout(1); | 34 | rb->backlight_set_timeout(1); |
31 | #if CONFIG_CHARGING | 35 | #if CONFIG_CHARGING |
32 | if (rb->global_settings->backlight_timeout_plugged > 1) | 36 | if (rb->global_settings->backlight_timeout_plugged > 1) |
33 | rb->backlight_set_timeout_plugged(1); | 37 | rb->backlight_set_timeout_plugged(1); |
34 | #endif /* CONFIG_CHARGING */ | 38 | #endif /* CONFIG_CHARGING */ |
35 | #endif /* HAVE_BACKLIGHT */ | 39 | /* #endif */ /* HAVE_BACKLIGHT */ |
36 | } | 40 | } |
37 | 41 | ||
38 | /* reset backlight operation to its settings */ | 42 | /* |
43 | * reset backlight operation to its settings | ||
44 | * now enabled regardless of HAVE_BACKLIGHT because it is not needed to | ||
45 | * build and makes modded targets easier to update | ||
46 | */ | ||
39 | void backlight_use_settings(void) | 47 | void backlight_use_settings(void) |
40 | { | 48 | { |
41 | #ifdef HAVE_BACKLIGHT | 49 | /* #ifdef HAVE_BACKLIGHT */ |
42 | rb->backlight_set_timeout(rb->global_settings->backlight_timeout); | 50 | rb->backlight_set_timeout(rb->global_settings->backlight_timeout); |
43 | #if CONFIG_CHARGING | 51 | #if CONFIG_CHARGING |
44 | rb->backlight_set_timeout_plugged(rb->global_settings-> \ | 52 | rb->backlight_set_timeout_plugged(rb->global_settings-> \ |
45 | backlight_timeout_plugged); | 53 | backlight_timeout_plugged); |
46 | #endif /* CONFIG_CHARGING */ | 54 | #endif /* CONFIG_CHARGING */ |
47 | #endif /* HAVE_BACKLIGHT */ | 55 | /* #endif */ /* HAVE_BACKLIGHT */ |
48 | } | 56 | } |