Fix loading screen being incorrectly displayed

This fixes an issue where some part of the loading screen would not be drawn correctly, due to the screen being updated recursively through UI_Update()
This commit is contained in:
smallmodel 2024-09-27 17:56:47 +02:00
parent 340f1bb287
commit 51afcd7b96

View file

@ -520,16 +520,18 @@ text to the screen.
==================
*/
void SCR_UpdateScreen( void ) {
static int recursive;
static qboolean screen_recursive;
if ( !scr_initialized ) {
return; // not initialized yet
}
if ( ++recursive > 2 ) {
Com_Error( ERR_FATAL, "SCR_UpdateScreen: recursively called" );
if (screen_recursive) {
// already called
return;
}
recursive = 1;
screen_recursive = qtrue;
CL_StartHunkUsers(qfalse);
SCR_SimpleUpdateScreen();
@ -553,6 +555,6 @@ void SCR_UpdateScreen( void ) {
}
}
recursive = 0;
screen_recursive = qfalse;
}