diff options
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry_windows.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/entry/entry_windows.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp index 9d0308e9617..29f8c65e881 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp @@ -30,6 +30,18 @@ namespace entry { + /// + inline void winSetHwnd(::HWND _window) + { + bgfx::PlatformData pd; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = NULL; + pd.backBuffer = NULL; + pd.backBufferDS = NULL; + 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+ @@ -434,13 +446,13 @@ namespace entry int32_t run(int _argc, char** _argv) { - SetDllDirectory("."); + SetDllDirectoryA("."); s_xinput.init(); HINSTANCE instance = (HINSTANCE)GetModuleHandle(NULL); - WNDCLASSEX wnd; + WNDCLASSEXA wnd; memset(&wnd, 0, sizeof(wnd) ); wnd.cbSize = sizeof(wnd); wnd.style = CS_HREDRAW | CS_VREDRAW; @@ -471,7 +483,7 @@ namespace entry | ENTRY_WINDOW_FLAG_FRAME ; - bgfx::winSetHwnd(m_hwnd[0]); + winSetHwnd(m_hwnd[0]); adjust(m_hwnd[0], ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT, true); clear(m_hwnd[0]); |