2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-11 03:47:50 +00:00

Fix magics (needs proper fix)

Implement windows profile directory retrieval
This commit is contained in:
2015-11-14 00:48:31 -08:00
parent 214841966b
commit 013046ad65
4 changed files with 27 additions and 4 deletions

View File

@@ -10,8 +10,8 @@ namespace HECL
namespace Runtime
{
static LogVisor::LogModule Log("ShaderCacheManager");
static uint64_t IDX_MAGIC = SBIG(0xDEADFEEDC001D00D);
static uint64_t DAT_MAGIC = SBIG(0xC001D00DDEADBABE);
static uint64_t IDX_MAGIC = SBig(0xDEADFEEDC001D00D);
static uint64_t DAT_MAGIC = SBig(0xC001D00DDEADBABE);
static uint64_t ZERO64 = 0;
static uint64_t timeHash()
@@ -49,7 +49,13 @@ void ShaderCacheManager::BootstrapIndex()
fwrite(&ZERO64, 1, 8, idxFp);
fclose(idxFp);
FILE* datFp = HECL::Fopen(idxFilename.c_str(), _S("wb"));
#if _WIN32
SystemString datFilename = m_datFr.wfilename();
#else
SystemString datFilename = m_datFr.filename();
#endif
FILE* datFp = HECL::Fopen(datFilename.c_str(), _S("wb"));
if (!datFp)
Log.report(LogVisor::FatalError, _S("unable to write shader cache data at %s"),
idxFilename.c_str());