diff options
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_windows.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/entry/entry_windows.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp index 401e971e6d4..5be017bce3b 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 Branimir Karadzic. All rights reserved. + * Copyright 2011-2017 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -7,7 +7,7 @@ #if ENTRY_CONFIG_USE_NATIVE && BX_PLATFORM_WINDOWS -#include <bgfx/bgfxplatform.h> +#include <bgfx/platform.h> #include <bx/uint32_t.h> #include <bx/thread.h> @@ -560,10 +560,15 @@ namespace entry case WM_USER_WINDOW_DESTROY: { 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; + + if (0 == handle.idx) + { + m_exit = true; + m_eventQueue.postExitEvent(); + } } break; @@ -615,15 +620,7 @@ namespace entry case WM_QUIT: case WM_CLOSE: - if (_hwnd == m_hwnd[0]) - { - m_exit = true; - m_eventQueue.postExitEvent(); - } - else - { - destroyWindow(findHandle(_hwnd) ); - } + destroyWindow(findHandle(_hwnd) ); // Don't process message. Window will be destroyed later. return 0; |