Skip to content

Commit 4f0074d

Browse files
committed
Partially fix black loading screen on Mac
1 parent 7132d14 commit 4f0074d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎src/engine/client/cl_scrn.cpp‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Maryland 20850 USA.
3737
#include "client.h"
3838
#include "qcommon/q_unicode.h"
3939

40+
#if defined(__APPLE__) && defined(BUILD_GRAPHICAL_CLIENT)
41+
#include <SDL3/SDL.h>
42+
#endif
43+
4044
bool scr_initialized; // ready to draw
4145

4246
/*
@@ -299,6 +303,16 @@ void SCR_UpdateScreen()
299303

300304
recursive = 1;
301305

306+
#ifdef __APPLE__
307+
if ( cls.state == connstate_t::CA_LOADING )
308+
{
309+
// Mitigate #1812. Calling SDL_PumpEvents 3 times makes the loading screen frames show up,
310+
// except the first one.
311+
SDL_PumpEvents();
312+
SDL_PumpEvents();
313+
SDL_PumpEvents();
314+
}
315+
#endif
302316
// If there is no VM, there are also no rendering commands issued. Stop the renderer in
303317
// that case.
304318
if ( cgvm.IsActive() )

0 commit comments

Comments
 (0)