2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-06 16:33:27 +00:00

Windows fixes

This commit is contained in:
Jack Andersen 2016-04-02 17:31:50 -10:00
parent 500589dbd3
commit 8534af8b4d
5 changed files with 22 additions and 16 deletions

View File

@ -239,7 +239,9 @@ BlenderConnection::BlenderConnection(int verbosityLevel)
if (verbosityLevel == 0)
{
SECURITY_ATTRIBUTES sattrs = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
nulHandle = CreateFileW(L"nul", GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, &sattrs, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
nulHandle = CreateFileW(L"nul", GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,
&sattrs, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
sinfo.hStdInput = nulHandle;
sinfo.hStdError = nulHandle;
sinfo.hStdOutput = nulHandle;
sinfo.dwFlags = STARTF_USESTDHANDLES;

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit 165b40448fa651ab56891ec7f4e3f149f8db7ecf
Subproject commit 01649d42f68c09f377741113ccd139116cb243e8

View File

@ -701,12 +701,16 @@ public:
{
if (absPath.size() > m_projRoot.size())
{
if (!absPath.compare(0, m_projRoot.size(), m_projRoot))
SystemString absPathForward(absPath);
for (SystemChar& ch : absPathForward)
if (ch == _S('\\'))
ch = _S('/');
if (!absPathForward.compare(0, m_projRoot.size(), m_projRoot))
{
auto beginIt = absPath.cbegin() + m_projRoot.size();
while (*beginIt == _S('/') || *beginIt == _S('\\'))
auto beginIt = absPathForward.cbegin() + m_projRoot.size();
while (*beginIt == _S('/'))
++beginIt;
return SystemString(beginIt, absPath.cend());
return SystemString(beginIt, absPathForward.cend());
}
}
LogModule.report(logvisor::Fatal, "unable to resolve '%s' as project relative '%s'",

View File

@ -111,8 +111,8 @@ std::string HLSL::makeVert(unsigned col, unsigned uv, unsigned w,
if (s)
{
/* skinned */
retval += " vec4 posAccum = float4(0.0,0.0,0.0,0.0);\n"
" vec4 normAccum = float4(0.0,0.0,0.0,0.0);\n";
retval += " float4 posAccum = float4(0.0,0.0,0.0,0.0);\n"
" float4 normAccum = float4(0.0,0.0,0.0,0.0);\n";
for (size_t i=0 ; i<s ; ++i)
retval += hecl::Format(" posAccum += mul(mv[%" PRISize "], float4(v.posIn, 1.0)) * v.weightIn[%" PRISize "][%" PRISize "];\n"
" normAccum += mul(mvInv[%" PRISize "], float4(v.normIn, 1.0)) * v.weightIn[%" PRISize "][%" PRISize "];\n",
@ -169,7 +169,7 @@ std::string HLSL::makeFrag(const ShaderFunction& lighting) const
if (lighting.m_entry)
retval += hecl::Format(" float4 lighting = %s();\n", lighting.m_entry);
else
retval += " float4 lighting = vec4(1.0,1.0,1.0,1.0);\n";
retval += " float4 lighting = float4(1.0,1.0,1.0,1.0);\n";
}
unsigned sampIdx = 0;

View File

@ -86,9 +86,9 @@ void ProjectPath::assign(Database::Project& project, const std::string& path)
m_absPath = project.getProjectRootPath().getAbsolutePath() + _S('/') + m_relPath;
SanitizePath(m_relPath);
SanitizePath(m_absPath);
m_hash = Hash(m_relPath);
m_utf8AbsPath = WideToUTF8(m_absPath);
m_utf8RelPath = WideToUTF8(m_relPath);
m_hash = Hash(m_utf8RelPath);
}
#endif
@ -118,9 +118,9 @@ void ProjectPath::assign(const ProjectPath& parentPath, const std::string& path)
m_absPath = m_proj->getProjectRootPath().getAbsolutePath() + _S('/') + m_relPath;
SanitizePath(m_relPath);
SanitizePath(m_absPath);
m_hash = Hash(m_relPath);
m_utf8AbsPath = WideToUTF8(m_absPath);
m_utf8RelPath = WideToUTF8(m_relPath);
m_hash = Hash(m_utf8RelPath);
}
#endif