diff options
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 076bd03b2da..5d60573d08e 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-2021 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2022 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ #include "entry_p.h" @@ -45,15 +45,6 @@ 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+ @@ -502,8 +493,6 @@ 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]); @@ -938,6 +927,7 @@ 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) @@ -1169,6 +1159,16 @@ 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; |