mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-21 14:23:02 +01:00
Fix Metal: Persist new window handle (Metal layer) when swapping view (#3452)
* When using the Metal rendering backend and updating the window handle via setPlatformData(), the passed in Metal layer was not stored. * Instead, the old window handle was still used. * The fix addresses a scenario where two BGFX-backed Metal views on iOS are created and rendering needs to happen either on one view or the other.
This commit is contained in:
@@ -3513,9 +3513,9 @@ static_assert(BX_COUNTOF(s_accessNames) == Access::Count, "Invalid s_accessNames
|
||||
else
|
||||
#endif // BX_PLATFORM_VISIONOS
|
||||
{
|
||||
if (m_metalLayer)
|
||||
if (NULL != m_metalLayer)
|
||||
{
|
||||
release(m_metalLayer);
|
||||
MTL_RELEASE(m_metalLayer);
|
||||
}
|
||||
|
||||
#if !BX_PLATFORM_VISIONOS
|
||||
|
||||
Reference in New Issue
Block a user