From 1b5454bd51ff825e8f2d9196bff9a25cab33b534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 30 Sep 2014 22:20:16 -0700 Subject: [PATCH] Fixed 22-windows example. --- examples/common/entry/entry_windows.cpp | 1 + src/renderer_d3d11.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index b50a3504a..f1b3d83fd 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -294,6 +294,7 @@ namespace entry WindowHandle handle = { (uint16_t)_wparam }; PostMessageA(m_hwnd[_wparam], WM_CLOSE, 0, 0); m_eventQueue.postWindowEvent(handle); + DestroyWindow(m_hwnd[_wparam]); m_hwnd[_wparam] = 0; } break; diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 6b8514e77..0179d8b19 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -1175,7 +1175,7 @@ RENDERDOC_IMPORT { HRESULT hr = 0; uint32_t syncInterval = !!(m_flags & BGFX_RESET_VSYNC); - for (uint32_t ii = 1, num = m_numWindows && SUCCEEDED(hr); ii < num; ++ii) + for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii) { hr = m_frameBuffers[m_windows[ii].idx].m_swapChain->Present(syncInterval, 0); }