diff options
author | 2023-01-04 23:29:18 -0500 | |
---|---|---|
committer | 2023-01-04 23:29:18 -0500 | |
commit | 94b1e168b2b97b48b81f7a8f64406b0a6f64184e (patch) | |
tree | f57362a0fa01bfe8f0ad75a447c4c9e10bc15756 /3rdparty/bgfx/examples/common/entry/entry_windows.cpp | |
parent | 5581eaa50a42256242f32569f59ce10d70ddd8c2 (diff) |
Revert "Update BGFX, BX and BIMG (#10750)" (#10787)
This reverts commit 5581eaa50a42256242f32569f59ce10d70ddd8c2 due to link failure on macOS.
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_windows.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/entry/entry_windows.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp index 5d60573d08e..076bd03b2da 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp @@ -1,6 +1,6 @@ /* - * Copyright 2011-2022 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE + * Copyright 2011-2021 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include "entry_p.h" @@ -45,6 +45,15 @@ namespace entry return utf16; } + /// + inline void winSetHwnd(::HWND _window) + { + bgfx::PlatformData pd; + bx::memSet(&pd, 0, sizeof(pd) ); + pd.nwh = _window; + bgfx::setPlatformData(pd); + } + typedef DWORD (WINAPI* PFN_XINPUT_GET_STATE)(DWORD dwUserIndex, XINPUT_STATE* pState); typedef void (WINAPI* PFN_XINPUT_ENABLE)(BOOL enable); // 1.4+ @@ -493,6 +502,8 @@ namespace entry | ENTRY_WINDOW_FLAG_FRAME ; + winSetHwnd(m_hwnd[0]); + adjust(m_hwnd[0], ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT, true); clear(m_hwnd[0]); @@ -927,7 +938,6 @@ namespace entry SelectObject(hdc, brush); FillRect(hdc, &rect, brush); ReleaseDC(_hwnd, hdc); - DeleteObject(brush); } void adjust(HWND _hwnd, uint32_t _width, uint32_t _height, bool _windowFrame) @@ -1159,16 +1169,6 @@ namespace entry PostMessage(s_ctx.m_hwnd[0], WM_USER_WINDOW_MOUSE_LOCK, _handle.idx, _lock); } - void* getNativeWindowHandle(WindowHandle _handle) - { - return s_ctx.m_hwnd[_handle.idx]; - } - - void* getNativeDisplayHandle() - { - return NULL; - } - int32_t MainThreadEntry::threadFunc(bx::Thread* /*_thread*/, void* _userData) { MainThreadEntry* self = (MainThreadEntry*)_userData; |