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.