mirror of https://github.com/AxioDL/metaforce.git
Windows build fixes
This commit is contained in:
parent
577af720d3
commit
5f60a33cce
|
@ -192,7 +192,6 @@ void BlenderConnection::_blenderDied()
|
||||||
BlenderConnection::BlenderConnection(int verbosityLevel)
|
BlenderConnection::BlenderConnection(int verbosityLevel)
|
||||||
{
|
{
|
||||||
BlenderLog.report(logvisor::Info, "Establishing BlenderConnection...");
|
BlenderLog.report(logvisor::Info, "Establishing BlenderConnection...");
|
||||||
signal(SIGPIPE, SIG_IGN);
|
|
||||||
|
|
||||||
/* Put hecl_blendershell.py in temp dir */
|
/* Put hecl_blendershell.py in temp dir */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -201,6 +200,7 @@ BlenderConnection::BlenderConnection(int verbosityLevel)
|
||||||
TMPDIR = (wchar_t*)L"\\Temp";
|
TMPDIR = (wchar_t*)L"\\Temp";
|
||||||
m_startupBlend = hecl::WideToUTF8(TMPDIR);
|
m_startupBlend = hecl::WideToUTF8(TMPDIR);
|
||||||
#else
|
#else
|
||||||
|
signal(SIGPIPE, SIG_IGN);
|
||||||
char* TMPDIR = getenv("TMPDIR");
|
char* TMPDIR = getenv("TMPDIR");
|
||||||
if (!TMPDIR)
|
if (!TMPDIR)
|
||||||
TMPDIR = (char*)"/tmp";
|
TMPDIR = (char*)"/tmp";
|
||||||
|
@ -345,7 +345,7 @@ BlenderConnection::BlenderConnection(int verbosityLevel)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Stash error path an unlink existing file */
|
/* Stash error path an unlink existing file */
|
||||||
m_errPath = hecl::SystemString(TMPDIR) + hecl::Format(_S("/hecl_%016llX.derp"), (unsigned long long)m_blenderProc);
|
m_errPath = hecl::SystemString(TMPDIR) + hecl::SysFormat(_S("/hecl_%016llX.derp"), (unsigned long long)m_blenderProc);
|
||||||
hecl::Unlink(m_errPath.c_str());
|
hecl::Unlink(m_errPath.c_str());
|
||||||
|
|
||||||
/* Handle first response */
|
/* Handle first response */
|
||||||
|
|
|
@ -186,12 +186,9 @@ std::string HLSL::makeFrag(bool alphaTest, const ShaderFunction& lighting) const
|
||||||
if (lighting.m_source)
|
if (lighting.m_source)
|
||||||
lightingSrc = lighting.m_source;
|
lightingSrc = lighting.m_source;
|
||||||
else
|
else
|
||||||
lightingSrc = "cbuffer LightingUniform : register(b2)\n"
|
lightingSrc = "static const float4 colorReg0 = float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||||
"{\n"
|
"static const float4 colorReg1 = float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||||
" float4 colorReg0;\n"
|
"static const float4 colorReg2 = float4(1.0, 1.0, 1.0, 1.0);\n";
|
||||||
" float4 colorReg1;\n"
|
|
||||||
" float4 colorReg2;\n"
|
|
||||||
"};\n";
|
|
||||||
|
|
||||||
std::string texMapDecl;
|
std::string texMapDecl;
|
||||||
if (m_texMapEnd)
|
if (m_texMapEnd)
|
||||||
|
@ -236,12 +233,9 @@ std::string HLSL::makeFrag(bool alphaTest, const ShaderFunction& lighting,
|
||||||
if (lighting.m_source)
|
if (lighting.m_source)
|
||||||
lightingSrc = lighting.m_source;
|
lightingSrc = lighting.m_source;
|
||||||
else
|
else
|
||||||
lightingSrc = "cbuffer LightingUniform : register(b2)\n"
|
lightingSrc = "static const float4 colorReg0 = float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||||
"{\n"
|
"static const float4 colorReg1 = float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||||
" float4 colorReg0;\n"
|
"static const float4 colorReg2 = float4(1.0, 1.0, 1.0, 1.0);\n";
|
||||||
" float4 colorReg1;\n"
|
|
||||||
" float4 colorReg2;\n"
|
|
||||||
"};\n";
|
|
||||||
|
|
||||||
std::string postSrc;
|
std::string postSrc;
|
||||||
if (post.m_source)
|
if (post.m_source)
|
||||||
|
|
Loading…
Reference in New Issue