Create window early for immediate feedback

This commit is contained in:
Eidolon 2026-04-14 16:58:35 -05:00
parent 49beb6b74b
commit f460387199
4 changed files with 9 additions and 28 deletions

View file

@ -1914,10 +1914,6 @@ void CON_Drawer(void)
static const char *CON_LoadingStrings[LOADED_ALLDONE+1] =
{
"Init zone memory...", //LOADED_ZINIT
"Init game timing...", //LOADED_ISTARTUPTIMER
"Loading main assets...", //LOADED_IWAD
"Init graphics subsystem...", //LOADED_ISTARTUPGRAPHICS
"Cache fonts...", //LOADED_HUINIT
"Loading add-ons...", //LOADED_PWAD
"Load settings...", //LOADED_CONFIG
@ -1937,21 +1933,11 @@ static const char *CON_LoadingStrings[LOADED_ALLDONE+1] =
//
void CON_SetLoadingProgress(con_loadprogress_t newStep)
{
const con_loadprogress_t expectedStep = con_startup_loadprogress + 1;
if (newStep != expectedStep)
{
I_Error("Something is wrong with the loading bar! (got %d, expected %d)\n", newStep, expectedStep);
return;
}
con_startup_loadprogress = newStep;
if (con_startup_loadprogress <= LOADED_ALLDONE)
CONS_Printf("LOADING UPDATE - %s\n", CON_LoadingStrings[con_startup_loadprogress]);
if (con_startup_loadprogress < LOADED_ISTARTUPGRAPHICS) // rendering not possible?
return;
CON_DrawLoadBar(); // here we display the console text
I_OsPolling();
I_UpdateNoBlit();

View file

@ -39,11 +39,7 @@ extern boolean con_startup;
// when modifying the below, you must also adjust d_main and console.c
typedef enum
{
LOADED_ZINIT = 1,
LOADED_ISTARTUPTIMER,
LOADED_IWAD,
LOADED_ISTARTUPGRAPHICS,
LOADED_HUINIT,
LOADED_HUINIT = 1,
LOADED_PWAD,
LOADED_CONFIG,
LOADED_INITTEXTUREDATA,

View file

@ -106,7 +106,7 @@ extern "C" consvar_t cv_lua_profile, cv_menuframeskip;
/* Manually defined asset hashes
*/
#define ASSET_HASH_BIOS_PK3 "36201c4690256d133dff7d3879436dff"
#define ASSET_HASH_SCRIPTS_PK3 "56be3c47192870c3265f19cf024e860e"
#define ASSET_HASH_GFX_PK3 "76c824a221bd4745e002a8b7d0520621"
@ -1717,12 +1717,13 @@ void D_SRB2Main(void)
CONS_Printf("Z_Init(): Init zone memory allocation daemon. \n");
Z_Init();
CON_SetLoadingProgress(LOADED_ZINIT);
M_NewGameDataStruct();
// Do this up here so that WADs loaded through the command line can use ExecCfg
COM_Init();
CONS_Printf("I_StartupGraphics()...\n");
I_StartupGraphics();
COM_AddDebugCommand("assert", Command_assert);
#ifdef DEVELOP
@ -1762,7 +1763,6 @@ void D_SRB2Main(void)
CONS_Printf("I_InitializeTime()...\n");
I_InitializeTime();
CON_SetLoadingProgress(LOADED_ISTARTUPTIMER);
// Make backups of some SOCcable tables.
P_BackupTables();
@ -1788,8 +1788,6 @@ void D_SRB2Main(void)
basenummapheaders = nummapheaders;
basenumkartcupheaders = numkartcupheaders;
CON_SetLoadingProgress(LOADED_IWAD);
M_PasswordInit();
W_InitShaderLookup(va(spandf, srb2path, "data", "shaders.pk3"));
@ -1797,8 +1795,6 @@ void D_SRB2Main(void)
//---------------------------------------------------- READY SCREEN
// we need to check for dedicated before initialization of some subsystems
CONS_Printf("I_StartupGraphics()...\n");
I_StartupGraphics();
I_StartDisplayUpdate();
I_StartupInput();
@ -1817,8 +1813,6 @@ void D_SRB2Main(void)
// Do this in background; lots of number crunching
R_InitTranslucencyTables();
CON_SetLoadingProgress(LOADED_ISTARTUPGRAPHICS);
CONS_Printf("HU_Init()...\n");
HU_Init();

View file

@ -1614,6 +1614,11 @@ void I_StartupGraphics(void)
SDL_RaiseWindow(window);
graphics_started = true;
#ifdef __APPLE__
// Must pump events once after creating window before window will actually appear.
SDL_PumpEvents();
#endif
}
void VID_StartupOpenGL(void)