From a366f99d7dfb45fa0b1bc784a6e8ad8891fb37d2 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 2 Oct 2025 22:42:20 +0500 Subject: [PATCH] engine: client: do not modify internal_vgui_support field as game info must be immutable once loaded --- engine/client/cl_game.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index 95c0244f..55faa6a7 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -3962,6 +3962,7 @@ qboolean CL_LoadProgs( const char *name ) CL_EXPORT_FUNCS GetClientAPI; // single export qboolean valid_single_export = false; qboolean missed_exports = false; + qboolean try_internal_vgui_support = GI->internal_vgui_support; int i; if( clgame.hInstance ) CL_UnloadProgs(); @@ -3982,10 +3983,10 @@ qboolean CL_LoadProgs( const char *name ) // NOTE: important stuff! // vgui must startup BEFORE loading client.dll to avoid get error ERROR_NOACESS during LoadLibrary - if( !GI->internal_vgui_support && VGui_LoadProgs( NULL )) + if( !try_internal_vgui_support && VGui_LoadProgs( NULL )) VGui_Startup( refState.width, refState.height ); else - GI->internal_vgui_support = true; // we failed to load vgui_support, but let's probe client.dll for support anyway + try_internal_vgui_support = true; // we failed to load vgui_support, but let's probe client.dll for support anyway clgame.hInstance = COM_LoadLibrary( name, false, false ); @@ -3993,7 +3994,7 @@ qboolean CL_LoadProgs( const char *name ) return false; // delayed vgui initialization for internal support - if( GI->internal_vgui_support && VGui_LoadProgs( clgame.hInstance )) + if( try_internal_vgui_support && VGui_LoadProgs( clgame.hInstance )) VGui_Startup( refState.width, refState.height ); // clear exports