2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 20:27:43 +00:00

Initial ShaderCache implementation

This commit is contained in:
Jack Andersen
2015-11-12 16:12:09 -10:00
parent a9fe41d994
commit 7c0206bd39
12 changed files with 440 additions and 209 deletions

View File

@@ -0,0 +1,31 @@
#include "HECL/Runtime.hpp"
#include <LogVisor/LogVisor.hpp>
namespace HECL
{
namespace Runtime
{
static LogVisor::LogModule Log("FileStoreManager");
FileStoreManager::FileStoreManager(const SystemString& domain)
: m_domain(domain)
{
#if _WIN32
#elif __APPLE__
#else
const char* home = getenv("HOME");
if (!home)
Log.report(LogVisor::FatalError, "unable to locate $HOME for file store");
std::string path(home);
path += "/.heclrun";
if (mkdir(path.c_str(), 0755))
Log.report(LogVisor::FatalError, "unable to mkdir at %s", path.c_str());
path += '/' + domain;
if (mkdir(path.c_str(), 0755))
Log.report(LogVisor::FatalError, "unable to mkdir at %s", path.c_str());
m_storeRoot = path;
#endif
}
}
}