1
0
Fork 0
forked from fte/fteqw

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:
Spoike 2012-11-30 02:50:50 +00:00
parent d248ce223f
commit 0b4d06b4ff

View file

@ -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;
}