From d94c38b7efa77c606e21e604e50d3726e3edcec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 9 Apr 2015 20:03:59 -0700 Subject: [PATCH] Fixed issue #325. --- 3rdparty/ocornut-imgui/imconfig.h | 4 ++-- src/renderer_d3d11.cpp | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) 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;