mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-09-20 11:09:38 +00:00
Windows build fixes
This commit is contained in:
parent
afc3e454a0
commit
199f38933d
@ -18,15 +18,15 @@ std::vector<hecl::SystemString> FileBrowser::PathComponents(hecl::SystemStringVi
|
|||||||
if (sPath.empty())
|
if (sPath.empty())
|
||||||
return ret;
|
return ret;
|
||||||
auto it = sPath.cbegin();
|
auto it = sPath.cbegin();
|
||||||
if (*it == _S('/'))
|
if (*it == _SYS_STR('/'))
|
||||||
{
|
{
|
||||||
ret.push_back(_S("/"));
|
ret.push_back(_SYS_STR("/"));
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
hecl::SystemString comp;
|
hecl::SystemString comp;
|
||||||
for (; it != sPath.cend() ; ++it)
|
for (; it != sPath.cend() ; ++it)
|
||||||
{
|
{
|
||||||
if (*it == _S('/'))
|
if (*it == _SYS_STR('/'))
|
||||||
{
|
{
|
||||||
if (comp.empty())
|
if (comp.empty())
|
||||||
continue;
|
continue;
|
||||||
@ -142,8 +142,8 @@ void FileBrowser::navigateToPath(hecl::SystemStringView path)
|
|||||||
for (const hecl::SystemString& d : m_comps)
|
for (const hecl::SystemString& d : m_comps)
|
||||||
{
|
{
|
||||||
if (needSlash)
|
if (needSlash)
|
||||||
dir += _S('/');
|
dir += _SYS_STR('/');
|
||||||
if (d.compare(_S("/")))
|
if (d.compare(_SYS_STR("/")))
|
||||||
needSlash = true;
|
needSlash = true;
|
||||||
dir += d;
|
dir += d;
|
||||||
}
|
}
|
||||||
@ -191,8 +191,8 @@ void FileBrowser::okActivated(bool viaButton)
|
|||||||
for (const hecl::SystemString& d : m_comps)
|
for (const hecl::SystemString& d : m_comps)
|
||||||
{
|
{
|
||||||
if (needSlash)
|
if (needSlash)
|
||||||
path += _S('/');
|
path += _SYS_STR('/');
|
||||||
if (d.compare(_S("/")))
|
if (d.compare(_SYS_STR("/")))
|
||||||
needSlash = true;
|
needSlash = true;
|
||||||
path += d;
|
path += d;
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ void FileBrowser::okActivated(bool viaButton)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
path += _S('/');
|
path += _SYS_STR('/');
|
||||||
path += hecl::SystemStringConv(m_fileField.m_view->getText()).sys_str();
|
path += hecl::SystemStringConv(m_fileField.m_view->getText()).sys_str();
|
||||||
|
|
||||||
int err = hecl::Stat(path.c_str(), &theStat);
|
int err = hecl::Stat(path.c_str(), &theStat);
|
||||||
@ -338,13 +338,13 @@ void FileBrowser::cancelActivated()
|
|||||||
for (const hecl::SystemString& d : m_comps)
|
for (const hecl::SystemString& d : m_comps)
|
||||||
{
|
{
|
||||||
if (needSlash)
|
if (needSlash)
|
||||||
path += _S('/');
|
path += _SYS_STR('/');
|
||||||
if (d.compare(_S("/")))
|
if (d.compare(_SYS_STR("/")))
|
||||||
needSlash = true;
|
needSlash = true;
|
||||||
path += d;
|
path += d;
|
||||||
}
|
}
|
||||||
|
|
||||||
path += _S('/');
|
path += _SYS_STR('/');
|
||||||
path += hecl::SystemStringConv(m_fileField.m_view->getText()).sys_str();
|
path += hecl::SystemStringConv(m_fileField.m_view->getText()).sys_str();
|
||||||
|
|
||||||
m_returnFunc(false, path);
|
m_returnFunc(false, path);
|
||||||
@ -362,8 +362,8 @@ void FileBrowser::pathButtonActivated(size_t idx)
|
|||||||
for (const hecl::SystemString& d : m_comps)
|
for (const hecl::SystemString& d : m_comps)
|
||||||
{
|
{
|
||||||
if (needSlash)
|
if (needSlash)
|
||||||
dir += _S('/');
|
dir += _SYS_STR('/');
|
||||||
if (d.compare(_S("/")))
|
if (d.compare(_SYS_STR("/")))
|
||||||
needSlash = true;
|
needSlash = true;
|
||||||
dir += d;
|
dir += d;
|
||||||
if (++i > idx)
|
if (++i > idx)
|
||||||
|
@ -681,7 +681,7 @@ FontCache::Library::~Library()
|
|||||||
|
|
||||||
FontCache::FontCache(const hecl::Runtime::FileStoreManager& fileMgr)
|
FontCache::FontCache(const hecl::Runtime::FileStoreManager& fileMgr)
|
||||||
: m_fileMgr(fileMgr),
|
: m_fileMgr(fileMgr),
|
||||||
m_cacheRoot(hecl::SystemString(m_fileMgr.getStoreRoot()) + _S("/fontcache")),
|
m_cacheRoot(hecl::SystemString(m_fileMgr.getStoreRoot()) + _SYS_STR("/fontcache")),
|
||||||
m_regFace(m_fontLib, DROIDSANS_PERMISSIVE, DROIDSANS_PERMISSIVE_SZ),
|
m_regFace(m_fontLib, DROIDSANS_PERMISSIVE, DROIDSANS_PERMISSIVE_SZ),
|
||||||
m_monoFace(m_fontLib, BMONOFONT, BMONOFONT_SZ),
|
m_monoFace(m_fontLib, BMONOFONT, BMONOFONT_SZ),
|
||||||
m_curvesFace(m_fontLib, SPECTERCURVES, SPECTERCURVES_SZ)
|
m_curvesFace(m_fontLib, SPECTERCURVES, SPECTERCURVES_SZ)
|
||||||
@ -710,7 +710,7 @@ FontTag FontCache::prepCustomFont(std::string_view name, FT_Face face,
|
|||||||
return tag;
|
return tag;
|
||||||
|
|
||||||
/* Now check filesystem cache */
|
/* Now check filesystem cache */
|
||||||
hecl::SystemString cachePath = m_cacheRoot + _S('/') + hecl::SysFormat(_S("%" PRIx64), tag.hash());
|
hecl::SystemString cachePath = m_cacheRoot + _SYS_STR('/') + hecl::SysFormat(_SYS_STR("%" PRIx64), tag.hash());
|
||||||
hecl::Sstat st;
|
hecl::Sstat st;
|
||||||
if (!hecl::Stat(cachePath.c_str(), &st) && S_ISREG(st.st_mode))
|
if (!hecl::Stat(cachePath.c_str(), &st) && S_ISREG(st.st_mode))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user