mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:04:56 +00:00
Massive fmtlib refactor
This commit is contained in:
@@ -16,7 +16,7 @@ FileStoreManager::FileStoreManager(SystemStringView domain) : m_domain(domain) {
|
||||
#if !WINDOWS_STORE
|
||||
WCHAR home[MAX_PATH];
|
||||
if (!SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PROFILE, NULL, 0, home)))
|
||||
Log.report(logvisor::Fatal, _SYS_STR("unable to locate profile for file store"));
|
||||
Log.report(logvisor::Fatal, fmt(_SYS_STR("unable to locate profile for file store")));
|
||||
|
||||
SystemString path(home);
|
||||
#else
|
||||
@@ -34,15 +34,15 @@ FileStoreManager::FileStoreManager(SystemStringView domain) : m_domain(domain) {
|
||||
#else
|
||||
const char* home = getenv("HOME");
|
||||
if (!home)
|
||||
Log.report(logvisor::Fatal, "unable to locate $HOME for file store");
|
||||
Log.report(logvisor::Fatal, fmt("unable to locate $HOME for file store"));
|
||||
std::string path(home);
|
||||
path += "/.heclrun";
|
||||
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
|
||||
Log.report(logvisor::Fatal, "unable to mkdir at %s", path.c_str());
|
||||
Log.report(logvisor::Fatal, fmt("unable to mkdir at {}"), path);
|
||||
path += '/';
|
||||
path += domain.data();
|
||||
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
|
||||
Log.report(logvisor::Fatal, "unable to mkdir at %s", path.c_str());
|
||||
Log.report(logvisor::Fatal, fmt("unable to mkdir at {}"), path);
|
||||
m_storeRoot = path;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ HMDLData::HMDLData(boo::IGraphicsDataFactory::Context& ctx, const void* metaData
|
||||
meta.read(r);
|
||||
}
|
||||
if (meta.magic != 'TACO')
|
||||
HMDL_Log.report(logvisor::Fatal, "invalid HMDL magic");
|
||||
HMDL_Log.report(logvisor::Fatal, fmt("invalid HMDL magic"));
|
||||
|
||||
m_vbo = ctx.newStaticBuffer(boo::BufferUse::Vertex, vbo, meta.vertStride, meta.vertCount);
|
||||
m_ibo = ctx.newStaticBuffer(boo::BufferUse::Index, ibo, 4, meta.indexCount);
|
||||
|
||||
Reference in New Issue
Block a user