Avoid two subsequent full update.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23645 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-11-16 01:38:33 +00:00
parent bdf2961ba3
commit cc697a8f7a

View file

@ -1161,7 +1161,25 @@ long gui_wps_show(void)
}
}
if (wps_sync_data.do_full_update || update)
if (restore && wps_state.id3 &&
((restoretimer == RESTORE_WPS_INSTANTLY) ||
TIME_AFTER(current_tick, restoretimer)))
{
restore = false;
restoretimer = RESTORE_WPS_INSTANTLY;
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
add_event(LCD_EVENT_ACTIVATION, false, wps_lcd_activation_hook);
#endif
/* we remove the update delay since it's not very usable in the wps,
* e.g. during volume changing or ffwd/rewind */
sb_skin_set_update_delay(0);
FOR_NB_SCREENS(i)
gui_wps[i].display->backdrop_show(BACKDROP_SKIN_WPS);
send_event(GUI_EVENT_REFRESH, gwps_enter_wps);
wps_sync_data.do_full_update = update = false;
}
else if (wps_sync_data.do_full_update || update)
{
#if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD)
gwps_caption_backlight(&wps_state);
@ -1181,23 +1199,6 @@ long gui_wps_show(void)
update = false;
}
if (restore && wps_state.id3 &&
((restoretimer == RESTORE_WPS_INSTANTLY) ||
TIME_AFTER(current_tick, restoretimer)))
{
restore = false;
restoretimer = RESTORE_WPS_INSTANTLY;
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
add_event(LCD_EVENT_ACTIVATION, false, wps_lcd_activation_hook);
#endif
/* we remove the update delay since it's not very usable in the wps,
* e.g. during volume changing or ffwd/rewind */
sb_skin_set_update_delay(0);
FOR_NB_SCREENS(i)
gui_wps[i].display->backdrop_show(BACKDROP_SKIN_WPS);
send_event(GUI_EVENT_REFRESH, gwps_enter_wps);
}
if (exit) {
#ifdef HAVE_LCD_CHARCELLS
status_set_record(false);