From 6e2f485b502fe0b679f27fb2abcc9779a554331c Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 24 Feb 2026 15:31:59 +0100 Subject: [PATCH] move W_Startup to I_StartupSystem this needs to be init as early as possible before anything may call W_CheckNumForName --- src/d_main.c | 2 -- src/dedicated/i_system.c | 1 + src/sdl/i_system.cpp | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 5ffb14f1c..34209e32a 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1722,8 +1722,6 @@ void D_SRB2Main(void) I_OutputMsg("setvbuf didnt work\n"); #endif - W_Startup(); - // get parameters from a response file (eg: srb2 @parms.txt) M_FindResponseFile(); diff --git a/src/dedicated/i_system.c b/src/dedicated/i_system.c index 9359b69d2..87a93fd48 100644 --- a/src/dedicated/i_system.c +++ b/src/dedicated/i_system.c @@ -1402,6 +1402,7 @@ static void I_Fork(void) INT32 I_StartupSystem(void) { + W_Startup(); I_StartupConsole(); #ifdef NEWSIGNALHANDLER // This is useful when debugging. It lets GDB attach to diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 737a13a7b..c2a473cad 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1933,6 +1933,9 @@ INT32 I_StartupSystem(void) SDL_version SDLlinked; SDL_VERSION(&SDLcompiled) SDL_GetVersion(&SDLlinked); + + W_Startup(); + I_StartupConsole(); #ifdef NEWSIGNALHANDLER // This is useful when debugging. It lets GDB attach to