diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/vu_meter.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 356a7fdd93..39deae6947 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include "plugin.h" | 20 | #include "plugin.h" |
21 | #include "fixedpoint.h" | 21 | #include "fixedpoint.h" |
22 | #include "lib/playback_control.h" | 22 | #include "lib/playback_control.h" |
23 | #include "lib/helper.h" | ||
24 | #include "lib/pluginlib_exit.h" | ||
23 | 25 | ||
24 | 26 | ||
25 | 27 | ||
@@ -910,6 +912,12 @@ static void digital_meter(void) { | |||
910 | rb->lcd_hline(0,LCD_WIDTH-1,half_height+3); | 912 | rb->lcd_hline(0,LCD_WIDTH-1,half_height+3); |
911 | } | 913 | } |
912 | 914 | ||
915 | static void vu_meter_cleanup(void) | ||
916 | { | ||
917 | /* Turn on backlight timeout (revert to settings) */ | ||
918 | backlight_use_settings(); | ||
919 | } | ||
920 | |||
913 | enum plugin_status plugin_start(const void* parameter) { | 921 | enum plugin_status plugin_start(const void* parameter) { |
914 | int button; | 922 | int button; |
915 | #if defined(VUMETER_HELP_PRE) || defined(VUMETER_MENU_PRE) | 923 | #if defined(VUMETER_HELP_PRE) || defined(VUMETER_MENU_PRE) |
@@ -920,12 +928,17 @@ enum plugin_status plugin_start(const void* parameter) { | |||
920 | 928 | ||
921 | calc_scales(); | 929 | calc_scales(); |
922 | 930 | ||
931 | atexit(vu_meter_cleanup); | ||
932 | |||
923 | load_settings(); | 933 | load_settings(); |
924 | rb->lcd_setfont(FONT_SYSFIXED); | 934 | rb->lcd_setfont(FONT_SYSFIXED); |
925 | #ifdef HAVE_LCD_COLOR | 935 | #ifdef HAVE_LCD_COLOR |
926 | screen_foreground = rb->lcd_get_foreground(); | 936 | screen_foreground = rb->lcd_get_foreground(); |
927 | #endif | 937 | #endif |
928 | 938 | ||
939 | /* Turn off backlight timeout */ | ||
940 | backlight_ignore_timeout(); | ||
941 | |||
929 | while (1) | 942 | while (1) |
930 | { | 943 | { |
931 | rb->lcd_clear_display(); | 944 | rb->lcd_clear_display(); |