Fix a potential race condition with cuesheets (that hit every time in an archos test), plus a slight optimisation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12524 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2007-02-28 23:43:38 +00:00
parent d70dc25edf
commit b49602e7a9

View file

@ -2610,6 +2610,8 @@ bool update(struct gui_wps *gwps)
sizeof(gwps->state->current_track_path));
}
if (gwps->state->id3)
{
if (cuesheet_is_enabled() && gwps->state->id3->cuesheet_type
&& (gwps->state->id3->elapsed < curr_cue->curr_track->offset
|| (curr_cue->curr_track_idx < curr_cue->track_count - 1
@ -2624,16 +2626,12 @@ bool update(struct gui_wps *gwps)
gwps->display->stop_scroll();
if (gui_wps_display())
retcode = true;
else{
else
gui_wps_refresh(gwps, 0, WPS_REFRESH_ALL);
}
gui_wps_statusbar_draw(gwps, false);
return retcode;
}
if (gwps->state->id3)
else
gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC);
}
gui_wps_statusbar_draw(gwps, false);