void SCR_PopLoadingScreen (qboolean redraw)
{
loadingscreenstack_t *s = loadingscreenstack;
+
+ if(!s)
+ {
+ Con_DPrintf("Popping a loading screen item from an empty stack!\n");
+ return;
+ }
+
loadingscreenstack = s->prev;
if(s->prev)
s->prev->relative_completion = (s->absolute_loading_amount_min + s->absolute_loading_amount_len - s->prev->absolute_loading_amount_min) / s->prev->absolute_loading_amount_len;
SCR_UpdateLoadingScreenIfShown();
}
+void SCR_ClearLoadingScreen (qboolean redraw)
+{
+ while(loadingscreenstack)
+ SCR_PopLoadingScreen(redraw && !loadingscreenstack->prev);
+}
+
static float SCR_DrawLoadingStack_r(loadingscreenstack_t *s, float y)
{
float size = 8;
for (;;)
{
if (setjmp(host_abortframe))
+ {
+ SCR_ClearLoadingScreen(false);
continue; // something bad happened, or the server disconnected
+ }
oldrealtime = realtime;
realtime = Sys_DoubleTime();
// pushes an item on the loading screen
void SCR_PushLoadingScreen (qboolean redraw, const char *msg, float len_in_parent);
void SCR_PopLoadingScreen (qboolean redraw);
+void SCR_ClearLoadingScreen (qboolean redraw);
extern float scr_con_current; // current height of displayed console