Fixed mach TLS issue.

This commit is contained in:
Branimir Karadžić 2015-05-21 16:50:14 -07:00
parent 57f61b7e32
commit cd234013ce

View file

@ -919,7 +919,10 @@ namespace bgfx
// When bgfx::renderFrame is called before init render thread // When bgfx::renderFrame is called before init render thread
// should not be created. // should not be created.
BX_TRACE("Application called bgfx::renderFrame directly, not creating render thread."); BX_TRACE("Application called bgfx::renderFrame directly, not creating render thread.");
m_singleThreaded = ~BGFX_MAIN_THREAD_MAGIC == s_threadIndex; m_singleThreaded = true
&& !BX_ENABLED(BX_PLATFORM_OSX || BX_PLATFORM_IOS)
&& ~BGFX_MAIN_THREAD_MAGIC == s_threadIndex
;
} }
else else
{ {
@ -932,6 +935,8 @@ namespace bgfx
m_singleThreaded = true; m_singleThreaded = true;
#endif // BGFX_CONFIG_MULTITHREADED #endif // BGFX_CONFIG_MULTITHREADED
BX_TRACE("Running in %s-threaded mode", m_singleThreaded ? "single" : "multi");
s_threadIndex = BGFX_MAIN_THREAD_MAGIC; s_threadIndex = BGFX_MAIN_THREAD_MAGIC;
for (uint32_t ii = 0; ii < BX_COUNTOF(m_viewRemap); ++ii) for (uint32_t ii = 0; ii < BX_COUNTOF(m_viewRemap); ++ii)