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 char* skin_buffer;
|
||||||
static bool defer_rendering;
|
static bool defer_rendering;
|
||||||
static bool dirty;
|
static bool dirty[NB_SCREENS];
|
||||||
|
|
||||||
static inline struct skin_element*
|
static inline struct skin_element*
|
||||||
get_child(OFFSETTYPE(struct skin_element**) children, int child)
|
get_child(OFFSETTYPE(struct skin_element**) children, int child)
|
||||||
|
|
@ -850,9 +850,9 @@ void skin_defer_rendering(bool deferred)
|
||||||
|
|
||||||
void skin_render_deferred(struct screen *display, struct viewport *vp)
|
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->set_viewport(NULL);
|
||||||
display->update();
|
display->update();
|
||||||
sb_skin_force_next_update();
|
sb_skin_force_next_update();
|
||||||
|
|
@ -964,7 +964,7 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
|
||||||
/* Restore the default viewport */
|
/* Restore the default viewport */
|
||||||
display->set_viewport_ex(NULL, VP_FLAG_VP_SET_CLEAN);
|
display->set_viewport_ex(NULL, VP_FLAG_VP_SET_CLEAN);
|
||||||
if (defer_rendering)
|
if (defer_rendering)
|
||||||
dirty = true;
|
dirty[display->screen_type] = true;
|
||||||
else
|
else
|
||||||
display->update();
|
display->update();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,17 +182,18 @@ int sb_get_backdrop(enum screen_type screen)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
static bool force_waiting = false;
|
static bool force_waiting[NB_SCREENS];
|
||||||
void sb_skin_update(enum screen_type screen, bool force)
|
void sb_skin_update(enum screen_type screen, bool force)
|
||||||
{
|
{
|
||||||
struct wps_data *data = skin_get_gwps(CUSTOM_STATUSBAR, screen)->data;
|
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;
|
int i = screen;
|
||||||
if (!data->wps_loaded)
|
if (!data->wps_loaded)
|
||||||
return;
|
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)
|
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
|
||||||
/* currently, all remotes are readable without backlight
|
/* currently, all remotes are readable without backlight
|
||||||
* so still update those */
|
* 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
|
/* the WPS handles changing the actual id3 data in the id3 pointers
|
||||||
* we imported, we just want a full update */
|
* we imported, we just want a full update */
|
||||||
skin_request_full_update(CUSTOM_STATUSBAR);
|
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 */
|
/* force timeout in wps main loop, so that the update is instantly */
|
||||||
button_queue_post(BUTTON_NONE, 0);
|
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)
|
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:
|
/* This creates and loads a ".sbs" based on the user settings for:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue