mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 10:22:48 +01:00
Fix savefile path for Linux
This commit is contained in:
parent
3f3ca264a3
commit
05781c88b1
@ -62,7 +62,7 @@ void GetGameProfilePath(char* str)
|
|||||||
{
|
{
|
||||||
char* homepath;
|
char* homepath;
|
||||||
|
|
||||||
homepath = getenv("USERPROFILE"); // "USERPROFILE"
|
homepath = getenv(HOME_ENV); // "USERPROFILE"
|
||||||
|
|
||||||
if (homepath)
|
if (homepath)
|
||||||
{
|
{
|
||||||
|
@ -3,8 +3,10 @@
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
#define HOME_ENV "USERPROFILE"
|
||||||
#elif defined (__unix__)
|
#elif defined (__unix__)
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#define HOME_ENV "HOME"
|
||||||
#define _mkdir(str) mkdir(str, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
|
#define _mkdir(str) mkdir(str, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)
|
||||||
|
|
||||||
inline void fixslashes(char* pathbuff)
|
inline void fixslashes(char* pathbuff)
|
||||||
|
Loading…
Reference in New Issue
Block a user