diff --git a/include/win32/bc/config.h b/include/win32/bc/config.h index 33ba162..3016215 100644 --- a/include/win32/bc/config.h +++ b/include/win32/bc/config.h @@ -256,7 +256,7 @@ #define FS_USERPATH "." /* Location of QuakeForge's global config file */ -#define FS_GLOBALCFG ".\\global.cfg" +#define FS_GLOBALCFG "~/quakeforge.conf" #define strcasecmp(s1, s2) stricmp((s1), (s2)) #define strncasecmp(s1, s2, n) strnicmp((s1), (s2), (n)) diff --git a/include/win32/vc/config.h b/include/win32/vc/config.h index a27ff00..1d64d77 100644 --- a/include/win32/vc/config.h +++ b/include/win32/vc/config.h @@ -264,7 +264,7 @@ #define FS_USERPATH "." /* Location of QuakeForge's global config file */ -#define FS_GLOBALCFG ".\\global.cfg" +#define FS_GLOBALCFG "~/quakeforge.conf" #define strcasecmp(s1, s2) stricmp((s1), (s2)) #define strncasecmp(s1, s2, n) strnicmp((s1), (s2), (n)) diff --git a/source/quakeio.c b/source/quakeio.c index 95cd0ee..295bcb3 100644 --- a/source/quakeio.c +++ b/source/quakeio.c @@ -75,12 +75,20 @@ Qexpand_squiggle (const char *path, char *dest) strcpy (dest, path); return; } -#ifndef _WIN32 + +#ifdef _WIN32 + // LordHavoc: first check HOME to duplicate previous version behavior + // (also handy if someone wants it somewhere other than their + // windows directory) + home = getenv ("HOME"); + if (!home || !home[0]) + home = getenv ("WINDIR"); +#else if ((pwd_ent = getpwuid (getuid ()))) { home = pwd_ent->pw_dir; } else -#endif home = getenv ("HOME"); +#endif if (home) { strcpy (dest, home); @@ -349,7 +357,7 @@ Qeof (QFile *file) Qgetline - Dynamic lenght version of Qgets. DO NOT free the buffer. + Dynamic length version of Qgets. DO NOT free the buffer. */ char *