From 4ef23543ae2114dfdffed9c3a050941713103448 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 2 Oct 2025 22:42:51 +0500 Subject: [PATCH] filesystem: make current set GameInfo const --- filesystem/filesystem.c | 6 +++--- filesystem/filesystem.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/filesystem/filesystem.c b/filesystem/filesystem.c index 9d2048fa..6e9cc7c1 100644 --- a/filesystem/filesystem.c +++ b/filesystem/filesystem.c @@ -697,8 +697,8 @@ static qboolean FS_WriteGameInfo( const char *filepath, gameinfo_t *GameInfo ) FS_Printf( f, "hd_background\t\t%i\n", GameInfo->hd_background ); // always expose our extensions :) - FS_Printf( f, "internal_vgui_support\t\t%s\n", GameInfo->internal_vgui_support ? "1" : "0" ); - FS_Printf( f, "render_picbutton_text\t\t%s\n", GameInfo->render_picbutton_text ? "1" : "0" ); + FS_Printf( f, "internal_vgui_support\t\t%i\n", GameInfo->internal_vgui_support ); + FS_Printf( f, "render_picbutton_text\t\t%i\n", GameInfo->render_picbutton_text ); if( COM_CheckStringEmpty( GameInfo->demomap )) FS_Printf( f, "demomap\t\t\"%s\"\n", GameInfo->demomap ); @@ -1364,7 +1364,7 @@ void FS_Rescan( uint32_t flags, const char *language ) if( Q_stricmp( GI->basedir, GI->falldir ) && Q_stricmp( GI->gamefolder, GI->falldir )) FS_AddGameHierarchy( GI->falldir, flags ); - GI->added = true; + ((gameinfo_t *)GI)->added = true; // getting rid of const here, as this modifier only for the engine FS_AddGameHierarchy( GI->gamefolder, FS_GAMEDIR_PATH | flags ); } diff --git a/filesystem/filesystem.h b/filesystem/filesystem.h index 46621cc6..eae03550 100644 --- a/filesystem/filesystem.h +++ b/filesystem/filesystem.h @@ -143,7 +143,7 @@ typedef struct fs_dllinfo_t typedef struct fs_globals_t { - gameinfo_t *GameInfo; // current GameInfo + const gameinfo_t *GameInfo; // current GameInfo gameinfo_t *games[MAX_MODS]; // environment games (founded at each engine start) int numgames; } fs_globals_t;