From 8cec6094d2593eecf4b8923aa7351ac6b6e97253 Mon Sep 17 00:00:00 2001 From: Professor Hastig Date: Fri, 5 Jan 2024 07:58:43 +0100 Subject: [PATCH] open the main game window earlier in the startup procedure. --- src/d_main.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 52c5e4536c..279ad56dbb 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -3096,6 +3096,13 @@ static int FileSystemPrintf(FSMessageLevel level, const char* fmt, ...) static int D_InitGame(const FIWADInfo* iwad_info, std::vector& allwads, std::vector& pwads) { + if (!restart) + { + V_InitScreenSize(); + // This allocates a dummy framebuffer as a stand-in until V_Init2 is called. + V_InitScreen(); + V_Init2(); + } SavegameFolder = iwad_info->Autoname; gameinfo.gametype = iwad_info->gametype; gameinfo.flags = iwad_info->flags; @@ -3255,16 +3262,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector& allw if (!batchrun) Printf ("V_Init: allocate screen.\n"); if (!restart) { - V_InitScreenSize(); - // This allocates a dummy framebuffer as a stand-in until V_Init2 is called. - V_InitScreen (); - - if (StartScreen != nullptr) - { - V_Init2(); - StartScreen->Render(); - } - + if (StartScreen != nullptr) StartScreen->Render(); } else { @@ -3500,7 +3498,6 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector& allw return 1337; // special exit } - if (StartScreen == nullptr) V_Init2(); if (StartScreen) { StartScreen->Progress(max_progress); // advance progress bar to the end.