mirror of
https://github.com/love2d/love.git
synced 2026-08-20 20:49:54 +02:00
Import thelinx' freedesktop patch as in bug #105
This commit is contained in:
@@ -214,6 +214,16 @@ namespace physfs
|
|||||||
appdata = udir;
|
appdata = udir;
|
||||||
}
|
}
|
||||||
return appdata.c_str();
|
return appdata.c_str();
|
||||||
|
#elif defined(LOVE_LINUX)
|
||||||
|
if(appdata.empty())
|
||||||
|
{
|
||||||
|
char * xdgdatahome = getenv("XDG_DATA_HOM");
|
||||||
|
if (!xdgdatahome)
|
||||||
|
appdata = getUserDirectory();
|
||||||
|
else
|
||||||
|
appdata = xdgdatahome;
|
||||||
|
}
|
||||||
|
return appdata.c_str();
|
||||||
#else
|
#else
|
||||||
return getUserDirectory();
|
return getUserDirectory();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#define LOVE_FILESYSTEM_PHYSFS_FILESYSTEM_H
|
#define LOVE_FILESYSTEM_PHYSFS_FILESYSTEM_H
|
||||||
|
|
||||||
// STD
|
// STD
|
||||||
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
Reference in New Issue
Block a user