summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/entry_windows.cpp
diff options
context:
space:
mode:
author Miodrag Milanović <mmicko@gmail.com>2023-01-05 15:32:40 +0100
committer GitHub <noreply@github.com>2023-01-05 09:32:40 -0500
commit812e6094f47bb8d1da5a6b421aa4c724cf2035c0 (patch)
tree0f5bab2fe9393d1f629e9bf63e76cecca74ec0c9 /3rdparty/bgfx/examples/common/entry/entry_windows.cpp
parent4a1b41854bba8fc2567906b88bab8ca81e75d187 (diff)
Update BGFX, BX and BIMG (#10789)
* Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_windows.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_windows.cpp26
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;