mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
gui: skin_engine: fix dirty & force_waiting ignoring multiple screens
In part regression introduced in c145d19e85.
force_waiting not taking multiple screens into
account appears to be pre-existing issue.
Change-Id: Iabfc2933470145eb512c8f2763fb350e170cb1fa
This commit is contained in:
parent
20194cb606
commit
05f1a6605d
2 changed files with 14 additions and 11 deletions
|
|
@ -85,7 +85,7 @@ static void skin_render_playlistviewer(struct playlistviewer* viewer,
|
|||
|
||||
static char* skin_buffer;
|
||||
static bool defer_rendering;
|
||||
static bool dirty;
|
||||
static bool dirty[NB_SCREENS];
|
||||
|
||||
static inline struct skin_element*
|
||||
get_child(OFFSETTYPE(struct skin_element**) children, int child)
|
||||
|
|
@ -297,7 +297,7 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
|
|||
{
|
||||
struct skin_albumart *aa = SKINOFFSETTOPTR(skin_buffer, data->albumart);
|
||||
if (aa)
|
||||
{
|
||||
{
|
||||
int handle = playback_current_aa_hid(data->playback_aa_slot);
|
||||
#if CONFIG_TUNER
|
||||
if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF))
|
||||
|
|
@ -850,9 +850,9 @@ void skin_defer_rendering(bool deferred)
|
|||
|
||||
void skin_render_deferred(struct screen *display, struct viewport *vp)
|
||||
{
|
||||
if (dirty)
|
||||
if (dirty[display->screen_type])
|
||||
{
|
||||
dirty = false;
|
||||
dirty[display->screen_type] = false;
|
||||
display->set_viewport(NULL);
|
||||
display->update();
|
||||
sb_skin_force_next_update();
|
||||
|
|
@ -964,7 +964,7 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
|
|||
/* Restore the default viewport */
|
||||
display->set_viewport_ex(NULL, VP_FLAG_VP_SET_CLEAN);
|
||||
if (defer_rendering)
|
||||
dirty = true;
|
||||
dirty[display->screen_type] = true;
|
||||
else
|
||||
display->update();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,17 +182,18 @@ int sb_get_backdrop(enum screen_type screen)
|
|||
return -1;
|
||||
}
|
||||
#endif
|
||||
static bool force_waiting = false;
|
||||
static bool force_waiting[NB_SCREENS];
|
||||
void sb_skin_update(enum screen_type screen, bool force)
|
||||
{
|
||||
struct wps_data *data = skin_get_gwps(CUSTOM_STATUSBAR, screen)->data;
|
||||
static long next_update[NB_SCREENS] = {0};
|
||||
static long next_update[NB_SCREENS];
|
||||
int i = screen;
|
||||
if (!data->wps_loaded)
|
||||
return;
|
||||
if (TIME_AFTER(current_tick, next_update[i]) || force || force_waiting)
|
||||
if (TIME_AFTER(current_tick, next_update[i]) || force ||
|
||||
force_waiting[i])
|
||||
{
|
||||
force_waiting = false;
|
||||
force_waiting[i] = false;
|
||||
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
||||
/* currently, all remotes are readable without backlight
|
||||
* so still update those */
|
||||
|
|
@ -214,7 +215,8 @@ void do_sbs_update_callback(unsigned short id, void *param)
|
|||
/* the WPS handles changing the actual id3 data in the id3 pointers
|
||||
* we imported, we just want a full update */
|
||||
skin_request_full_update(CUSTOM_STATUSBAR);
|
||||
force_waiting = true;
|
||||
FOR_NB_SCREENS(i)
|
||||
force_waiting[i] = true;
|
||||
/* force timeout in wps main loop, so that the update is instantly */
|
||||
button_queue_post(BUTTON_NONE, 0);
|
||||
}
|
||||
|
|
@ -226,7 +228,8 @@ void sb_skin_set_update_delay(int delay)
|
|||
|
||||
void sb_skin_force_next_update(void)
|
||||
{
|
||||
force_waiting = true;
|
||||
FOR_NB_SCREENS(i)
|
||||
force_waiting[i] = true;
|
||||
}
|
||||
|
||||
/* This creates and loads a ".sbs" based on the user settings for:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue