Fix FS#10215 - peakmeter updates breaks scrolling lines in conditionally enalbed viewports... fix is to not disable conditional viewports during these updates which are *only* touching the pm token anyway

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24090 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2009-12-21 06:35:31 +00:00
parent 6643a3bc74
commit ae08a21b42

View file

@ -920,22 +920,28 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
} }
#endif #endif
/* disable any viewports which are conditionally displayed */ /* disable any viewports which are conditionally displayed.
for (viewport_list = data->viewports; * If we are only refreshing the peak meter then don't change the viewport
viewport_list; viewport_list = viewport_list->next) * enabled flags as this will stop scrolling. viewports cant be
* toggled in this refresh mode anyway (FS#10215)*/
if (refresh_mode != WPS_REFRESH_PEAK_METER)
{ {
struct skin_viewport *skin_viewport = for (viewport_list = data->viewports;
(struct skin_viewport *)viewport_list->token->value.data; viewport_list; viewport_list = viewport_list->next)
if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE)
{ {
continue; struct skin_viewport *skin_viewport =
} (struct skin_viewport *)viewport_list->token->value.data;
if (skin_viewport->hidden_flags&VP_DRAW_HIDEABLE) if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE)
{ {
if (skin_viewport->hidden_flags&VP_DRAW_HIDDEN) continue;
skin_viewport->hidden_flags |= VP_DRAW_WASHIDDEN; }
else if (skin_viewport->hidden_flags&VP_DRAW_HIDEABLE)
skin_viewport->hidden_flags |= VP_DRAW_HIDDEN; {
if (skin_viewport->hidden_flags&VP_DRAW_HIDDEN)
skin_viewport->hidden_flags |= VP_DRAW_WASHIDDEN;
else
skin_viewport->hidden_flags |= VP_DRAW_HIDDEN;
}
} }
} }
int viewport_count = 0; int viewport_count = 0;