From d193abb0ad0827d5ecc0915d65b67faf68a87097 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 3 Sep 2016 13:30:42 +0200 Subject: Update BGFX and BX packages and update MAME code to support new API (nw) Generated missing shaders (nw) --- 3rdparty/bgfx/examples/common/entry/entry_windows.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 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 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]); -- cgit v1.2.3-70-g09d2