Fix savefile path for Linux

This commit is contained in:
André Vicente Milack 2020-10-10 15:03:53 -03:00
parent 3f3ca264a3
commit 05781c88b1
2 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,7 @@ void GetGameProfilePath(char* str)
{
char* homepath;
homepath = getenv("USERPROFILE"); // "USERPROFILE"
homepath = getenv(HOME_ENV); // "USERPROFILE"
if (homepath)
{

View File

@ -3,8 +3,10 @@
#ifdef _WIN32
#include <direct.h>
#define HOME_ENV "USERPROFILE"
#elif defined (__unix__)
#include <sys/stat.h>
#define HOME_ENV "HOME"
#define _mkdir(str) mkdir(str, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
inline void fixslashes(char* pathbuff)