Skip to content

Commit

Permalink
open the main game window earlier in the startup procedure.
Browse files Browse the repository at this point in the history
  • Loading branch information
prof-hastig committed Jan 5, 2024
1 parent c62ecc4 commit f3700c4
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/d_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3096,6 +3096,13 @@ static int FileSystemPrintf(FSMessageLevel level, const char* fmt, ...)

static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& allwads, std::vector<std::string>& 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;
Expand Down Expand Up @@ -3255,16 +3262,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& 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
{
Expand Down Expand Up @@ -3500,7 +3498,6 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& allw
return 1337; // special exit
}

if (StartScreen == nullptr) V_Init2();
if (StartScreen)
{
StartScreen->Progress(max_progress); // advance progress bar to the end.
Expand Down

0 comments on commit f3700c4

Please sign in to comment.