From 9327e96e4d4f4d15421b71bbba8a9c44c4244951 Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Sat, 26 Dec 2020 17:19:14 -0600 Subject: [PATCH] Pause the console refresh while startup wads are loading. --- src/console.c | 13 +++++++++++++ src/console.h | 3 +++ src/d_main.c | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/src/console.c b/src/console.c index c7bfe0fe1..3785136af 100644 --- a/src/console.c +++ b/src/console.c @@ -484,6 +484,19 @@ void CON_Init(void) Unlock_state(); } } + +void CON_StartRefresh(void) +{ + if (con_startup) + con_refresh = true; +} + +void CON_StopRefresh(void) +{ + if (con_startup) + con_refresh = false; +} + // Console input initialization // static void CON_InputInit(void) diff --git a/src/console.h b/src/console.h index 0296f4f6e..db27d9358 100644 --- a/src/console.h +++ b/src/console.h @@ -16,6 +16,9 @@ void CON_Init(void); +void CON_StartRefresh(void); +void CON_StopRefresh(void); + boolean CON_Responder(event_t *ev); #ifdef HAVE_THREADS diff --git a/src/d_main.c b/src/d_main.c index a89f4ed2d..7d25208e7 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1275,10 +1275,14 @@ void D_SRB2Main(void) I_RegisterSysCommands(); + CON_StopRefresh(); // Temporarily stop refreshing the screen for wad loading + CONS_Printf("W_InitMultipleFiles(): Adding extra PWADs.\n"); W_InitMultipleFiles(startuppwads); D_CleanFile(startuppwads); + CON_StartRefresh(); // Restart the refresh! + CONS_Printf("HU_LoadGraphics()...\n"); HU_LoadGraphics();