From a983d4357bffe84cd5664de48ade2ab2ab36fb60 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 1 Sep 2025 18:18:59 +0100 Subject: [PATCH] Remove redundant buffers on *nix --- code/sys/sys_unix.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index 53593600..7226373e 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -43,18 +43,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA qboolean stdinIsATTY; -// Used to determine where to store user-specific files -static char homePath[ MAX_OSPATH ] = { 0 }; - -// Used to store the Steam Quake 3 installation path -static char steamPath[ MAX_OSPATH ] = { 0 }; - -// Used to store the GOG Quake 3 installation path -static char gogPath[ MAX_OSPATH ] = { 0 }; - -// Used to store the Microsoft Store Quake 3 installation path -static char microsoftStorePath[MAX_OSPATH] = { 0 }; - /* ================== Sys_DefaultHomePath @@ -62,6 +50,7 @@ Sys_DefaultHomePath */ char *Sys_DefaultHomePath(void) { + static char homePath[ MAX_OSPATH ] = { 0 }; char *p; if( !*homePath && com_homepath != NULL ) @@ -128,22 +117,8 @@ Sys_SteamPath */ char *Sys_SteamPath( void ) { - // Disabled since Steam doesn't let you install Quake 3 on Mac/Linux -#if 0 //#ifdef STEAMPATH_NAME - char *p; - - if( ( p = getenv( "HOME" ) ) != NULL ) - { -#ifdef __APPLE__ - char *steamPathEnd = "/Library/Application Support/Steam/SteamApps/common/" STEAMPATH_NAME; -#else - char *steamPathEnd = "/.steam/steam/SteamApps/common/" STEAMPATH_NAME; -#endif - Com_sprintf(steamPath, sizeof(steamPath), "%s%s", p, steamPathEnd); - } -#endif - - return steamPath; + // Steam doesn't let you install Quake 3 on Mac/Linux + return ""; } /* @@ -153,8 +128,8 @@ Sys_GogPath */ char *Sys_GogPath( void ) { - // GOG also doesn't let you install Quake 3 on Mac/Linux - return gogPath; + // GOG doesn't let you install Quake 3 on Mac/Linux + return ""; } /* @@ -165,7 +140,7 @@ Sys_MicrosoftStorePath char* Sys_MicrosoftStorePath(void) { // Microsoft Store doesn't exist on Mac/Linux - return microsoftStorePath; + return ""; }