Check /usr/share/quake to see if quake is installed there.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4157 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d248ce223f
commit
0b4d06b4ff
1 changed files with 16 additions and 1 deletions
|
@ -2405,10 +2405,25 @@ qboolean Sys_FindGameData(const char *poshname, const char *gamename, char *base
|
|||
return false;
|
||||
}
|
||||
#else
|
||||
#ifdef __linux__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
qboolean Sys_FindGameData(const char *poshname, const char *gamename, char *basepath, int basepathlen)
|
||||
{
|
||||
#ifdef __linux__
|
||||
// /usr/share/quake
|
||||
struct stat sb;
|
||||
if (!strcmp(gamename, "q1"))
|
||||
{
|
||||
if (stat("/usr/share/quake/", &sb) == 0)
|
||||
{
|
||||
// /usr/share/quake
|
||||
if (S_ISDIR(sb.st_mode))
|
||||
{
|
||||
Q_strncpyz(basepath, "/usr/share/quake/", basepathlen);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue