mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Fixed mach TLS issue.
This commit is contained in:
parent
57f61b7e32
commit
cd234013ce
1 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue