mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
D3D1x: Disable window changes on all windows.
This commit is contained in:
@@ -4592,6 +4592,15 @@ namespace bgfx { namespace d3d11
|
||||
);
|
||||
BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Failed to create swap chain.");
|
||||
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
DX_CHECK(s_renderD3D11->m_dxgi.m_factory->MakeWindowAssociation(
|
||||
(HWND)_nwh
|
||||
, 0
|
||||
| DXGI_MWA_NO_WINDOW_CHANGES
|
||||
| DXGI_MWA_NO_ALT_ENTER
|
||||
) );
|
||||
#endif // BX_PLATFORM_WINDOWS
|
||||
|
||||
ID3D11Resource* ptr;
|
||||
DX_CHECK(m_swapChain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&ptr) );
|
||||
DX_CHECK(device->CreateRenderTargetView(ptr, NULL, &m_rtv[0]) );
|
||||
|
||||
@@ -4949,13 +4949,20 @@ namespace bgfx { namespace d3d12
|
||||
|
||||
HRESULT hr;
|
||||
hr = s_renderD3D12->m_dxgi.createSwapChain(
|
||||
s_renderD3D12->getDeviceForSwapChain()
|
||||
, scd
|
||||
, &m_swapChain
|
||||
);
|
||||
s_renderD3D12->getDeviceForSwapChain()
|
||||
, scd
|
||||
, &m_swapChain
|
||||
);
|
||||
BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Failed to create swap chain.");
|
||||
m_state = D3D12_RESOURCE_STATE_PRESENT;
|
||||
|
||||
DX_CHECK(s_renderD3D12->m_dxgi.m_factory->MakeWindowAssociation(
|
||||
(HWND)_nwh
|
||||
, 0
|
||||
| DXGI_MWA_NO_WINDOW_CHANGES
|
||||
| DXGI_MWA_NO_ALT_ENTER
|
||||
) );
|
||||
|
||||
ID3D12Device* device = s_renderD3D12->m_device;
|
||||
FrameBufferHandle fbh = { uint16_t(this - s_renderD3D12->m_frameBuffers) };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user