diff --git a/3rdparty/ocornut-imgui/imconfig.h b/3rdparty/ocornut-imgui/imconfig.h index bcb0972e7..382b6c464 100644 --- a/3rdparty/ocornut-imgui/imconfig.h +++ b/3rdparty/ocornut-imgui/imconfig.h @@ -19,8 +19,8 @@ //#define IMGUI_API __declspec( dllimport ) //---- Don't implement default handlers for Windows (so as not to link with OpenClipboard() and others Win32 functions) -//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS -//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS +#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS +#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS //---- Include imgui_user.inl at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions. //#define IMGUI_INCLUDE_IMGUI_USER_INL diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index cb6b6c768..33b1e5b0a 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -686,6 +686,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); , NULL , &m_swapChain ); + BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Failed to create swap chain."); + + DX_CHECK(m_factory->MakeWindowAssociation(g_bgfxHwnd, 0 + | DXGI_MWA_NO_WINDOW_CHANGES + | DXGI_MWA_NO_ALT_ENTER + ) ); #else hr = adapter->GetParent(IID_IDXGIFactory, (void**)&m_factory); BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Unable to create Direct3D11 device."); @@ -708,13 +714,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); , &m_scd , &m_swapChain ); -#endif // BX_PLATFORM_WINRT BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Failed to create swap chain."); - - DX_CHECK(m_factory->MakeWindowAssociation(g_bgfxHwnd, 0 - | DXGI_MWA_NO_WINDOW_CHANGES - | DXGI_MWA_NO_ALT_ENTER - ) ); +#endif // BX_PLATFORM_WINRT m_numWindows = 1;