mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
shader cache
This commit is contained in:
parent
950bf66334
commit
c27ff546e4
15 changed files with 103 additions and 8 deletions
|
@ -62,6 +62,29 @@ boost::filesystem::path LinuxPath::getUserPath() const
|
|||
return userPath;
|
||||
}
|
||||
|
||||
boost::filesystem::path LinuxPath::getCachePath() const
|
||||
{
|
||||
boost::filesystem::path userPath(".");
|
||||
|
||||
const char* theDir = getenv("HOME");
|
||||
if (theDir == NULL)
|
||||
{
|
||||
struct passwd* pwd = getpwuid(getuid());
|
||||
if (pwd != NULL)
|
||||
{
|
||||
theDir = pwd->pw_dir;
|
||||
}
|
||||
}
|
||||
|
||||
if (theDir != NULL)
|
||||
{
|
||||
userPath = boost::filesystem::path(theDir);
|
||||
}
|
||||
userPath /= "/.cache/";
|
||||
|
||||
return userPath;
|
||||
}
|
||||
|
||||
boost::filesystem::path LinuxPath::getGlobalPath() const
|
||||
{
|
||||
boost::filesystem::path globalPath("/etc/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue