From a1641b6be3838f9e190b3316034a151f196d1ad7 Mon Sep 17 00:00:00 2001 From: Shpoike Date: Fri, 19 Jun 2020 22:39:16 +0100 Subject: [PATCH] Add -nohome arg to disable homedir use (when compiled to use them, consistent with other engines). --- Quake/sys_sdl_unix.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Quake/sys_sdl_unix.c b/Quake/sys_sdl_unix.c index 97815b9b..d252b7e3 100644 --- a/Quake/sys_sdl_unix.c +++ b/Quake/sys_sdl_unix.c @@ -353,10 +353,15 @@ void Sys_Init (void) #ifndef DO_USERDIRS host_parms->userdir = host_parms->basedir; /* code elsewhere relies on this ! */ #else - memset (userdir, 0, sizeof(userdir)); - Sys_GetUserdir(userdir, sizeof(userdir)); - Sys_mkdir (userdir); - host_parms->userdir = userdir; + if (COM_CheckParm("-nohome")) + host_parms->userdir = host_parms->basedir; + else + { + memset (userdir, 0, sizeof(userdir)); + Sys_GetUserdir(userdir, sizeof(userdir)); + Sys_mkdir (userdir); + host_parms->userdir = userdir; + } #endif host_parms->numcpus = Sys_NumCPUs (); Sys_Printf("Detected %d CPUs.\n", host_parms->numcpus);