mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
plugins: vu_meter: enable theme for submenus
Also properly handle situation where theme is already enabled at launch. Change-Id: Ic7b3dcf38e77f6e9d6ef4a5512f729e47880e46c
This commit is contained in:
parent
17ea0bb82e
commit
06af1090bb
1 changed files with 11 additions and 0 deletions
|
|
@ -685,6 +685,8 @@ static bool vu_meter_menu(void)
|
|||
{ "Very Slow", -1 },
|
||||
};
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
rb->viewportmanager_theme_enable(i, true, NULL);
|
||||
while (!menu_quit) {
|
||||
switch(rb->do_menu(&menu, &selection, NULL, false))
|
||||
{
|
||||
|
|
@ -744,6 +746,8 @@ static bool vu_meter_menu(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
FOR_NB_SCREENS(i)
|
||||
rb->viewportmanager_theme_undo(i, false);
|
||||
/* the menu uses the userfont, set it back to sysfont */
|
||||
rb->lcd_setfont(FONT_SYSFIXED);
|
||||
return exit;
|
||||
|
|
@ -948,6 +952,9 @@ static void vu_meter_cleanup(void)
|
|||
{
|
||||
/* Turn on backlight timeout (revert to settings) */
|
||||
backlight_use_settings();
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
rb->viewportmanager_theme_undo(i, false);
|
||||
}
|
||||
|
||||
enum plugin_status plugin_start(const void* parameter)
|
||||
|
|
@ -973,6 +980,10 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
/* Turn off backlight timeout */
|
||||
backlight_ignore_timeout();
|
||||
|
||||
/* undo in vu_meter_cleanup */
|
||||
FOR_NB_SCREENS(i)
|
||||
rb->viewportmanager_theme_enable(i, false, NULL);
|
||||
|
||||
while (1)
|
||||
{
|
||||
rb->lcd_clear_display();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue