Acquire resource API lock when calling bgfx::reset.

This commit is contained in:
Бранимир Караџић 2023-06-12 20:10:07 -07:00
parent e7e75e4bff
commit b5471d14f8

View File

@ -3165,6 +3165,8 @@ namespace bgfx
BGFX_API_FUNC(void reset(uint32_t _width, uint32_t _height, uint32_t _flags, TextureFormat::Enum _format) )
{
BGFX_MUTEX_SCOPE(m_resourceApiLock);
const TextureFormat::Enum format = TextureFormat::Count != _format ? _format : m_init.resolution.format;
if (!g_platformDataChangedSinceReset