From 6f16d0e68c80454cf77876bae951b05904e1d8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Wed, 16 Dec 2020 21:17:49 -0800 Subject: [PATCH] Cleanup. --- src/bgfx.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 7b6566f59..c0394bdbe 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -1845,6 +1845,19 @@ namespace bgfx bx::memCopy(&m_init.platformData, &g_platformData, sizeof(PlatformData) ); } + if (true + && !BX_ENABLED(BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_PS4) + && RendererType::Noop != m_init.type + && NULL == m_init.platformData.ndt + && NULL == m_init.platformData.nwh + && NULL == m_init.platformData.context + && NULL == m_init.platformData.backBuffer + && NULL == m_init.platformData.backBufferDS + ) + { + BX_TRACE("bgfx platform data like window handle or backbuffer is not set, creating headless device."); + } + m_exit = false; m_flipped = true; m_frames = 0; @@ -3438,19 +3451,6 @@ namespace bgfx s_callbackStub = BX_NEW(g_allocator, CallbackStub); } - if (true - && !BX_ENABLED(BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_PS4) - && RendererType::Noop != init.type - && NULL == init.platformData.ndt - && NULL == init.platformData.nwh - && NULL == init.platformData.context - && NULL == init.platformData.backBuffer - && NULL == init.platformData.backBufferDS - ) - { - BX_TRACE("bgfx platform data like window handle or backbuffer is not set, creating headless device."); - } - bx::memSet(&g_caps, 0, sizeof(g_caps) ); g_caps.limits.maxDrawCalls = BGFX_CONFIG_MAX_DRAW_CALLS; g_caps.limits.maxBlits = BGFX_CONFIG_MAX_BLIT_ITEMS;