mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-01-22 07:51:20 +00:00
WIN32 now uses %WINDIR% as the home dir (this basically means c:\windows\quakeforge.conf)
This commit is contained in:
parent
3b6b929841
commit
2a2b468090
3 changed files with 13 additions and 5 deletions
|
@ -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))
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue