shader cache

This commit is contained in:
scrawl 2012-09-02 19:40:26 +02:00
parent 950bf66334
commit c27ff546e4
15 changed files with 103 additions and 8 deletions

View file

@ -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/");