From 8981faa61fc1e9421805938e6656d84ff61be1f9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 15 Oct 2015 10:42:29 +0200 Subject: update bgfx to latest (nw) --- .../bgfx/examples/common/entry/entry_windows.cpp | 43 +++++++--------------- 1 file changed, 14 insertions(+), 29 deletions(-) (limited to '3rdparty/bgfx/examples/common/entry/entry_windows.cpp') diff --git a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp index a6a5ff2c973..c61450c9ab9 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp @@ -7,12 +7,13 @@ #if ENTRY_CONFIG_USE_NATIVE && BX_PLATFORM_WINDOWS -#include +#include #include #include #include #include +#include #include #include @@ -116,6 +117,17 @@ namespace entry void update(EventQueue& _eventQueue) { + int64_t now = bx::getHPCounter(); + static int64_t next = now; + + if (now < next) + { + return; + } + + const int64_t timerFreq = bx::getHPFrequency(); + next = now + timerFreq/60; + if (NULL == m_xinputdll) { return; @@ -518,7 +530,7 @@ namespace entry , msg->m_y , msg->m_width , msg->m_height - , m_hwnd[0] + , NULL , NULL , (HINSTANCE)GetModuleHandle(NULL) , 0 @@ -902,33 +914,6 @@ namespace entry top = newrect.top +(newrect.bottom-newrect.top-height)/2; } - HWND parent = GetWindow(_hwnd, GW_OWNER); - if (NULL != parent) - { - if (_windowFrame) - { - SetWindowPos(parent - , HWND_TOP - , -32000 - , -32000 - , 0 - , 0 - , SWP_SHOWWINDOW - ); - } - else - { - SetWindowPos(parent - , HWND_TOP - , newrect.left - , newrect.top - , newrect.right-newrect.left - , newrect.bottom-newrect.top - , SWP_SHOWWINDOW - ); - } - } - SetWindowPos(_hwnd , HWND_TOP , left -- cgit v1.2.3-70-g09d2