mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-29 14:48:31 +00:00
Examples: DX10, DX11: Disabled DXGI's Alt+Enter default behavior in examples. (#4350)
This commit is contained in:
@@ -92,6 +92,9 @@ Docking+Viewports Branch:
|
|||||||
viewports managed by the backend. (#4350) [@PathogenDavid]
|
viewports managed by the backend. (#4350) [@PathogenDavid]
|
||||||
- Backends: Vulkan: Added ImGui_ImplVulkanH_GetWindowDataFromViewport() accessor/helper.
|
- Backends: Vulkan: Added ImGui_ImplVulkanH_GetWindowDataFromViewport() accessor/helper.
|
||||||
(#8946, #8940) [@olivier-gerard]
|
(#8946, #8940) [@olivier-gerard]
|
||||||
|
- Examples: DX10, DX11: Disabled DXGI's Alt+Enter default behavior in examples.
|
||||||
|
Applications are free to leave this enabled, but it does not work properly with
|
||||||
|
multiple viewports. (#4350) [@PathogenDavid]
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
@@ -256,6 +256,13 @@ bool CreateDeviceD3D(HWND hWnd)
|
|||||||
if (res != S_OK)
|
if (res != S_OK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Disable DXGI's default Alt+Enter fullscreen behavior.
|
||||||
|
// - You are free to leave this enabled, but it will not work properly with multiple viewports.
|
||||||
|
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
|
||||||
|
IDXGIFactory* pSwapChainFactory;
|
||||||
|
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
|
||||||
|
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
|
||||||
|
|
||||||
CreateRenderTarget();
|
CreateRenderTarget();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -251,6 +251,13 @@ bool CreateDeviceD3D(HWND hWnd)
|
|||||||
if (res != S_OK)
|
if (res != S_OK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Disable DXGI's default Alt+Enter fullscreen behavior.
|
||||||
|
// - You are free to leave this enabled, but it will not work properly with multiple viewports.
|
||||||
|
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
|
||||||
|
IDXGIFactory* pSwapChainFactory;
|
||||||
|
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
|
||||||
|
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
|
||||||
|
|
||||||
CreateRenderTarget();
|
CreateRenderTarget();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -241,6 +241,13 @@ bool CreateDeviceD3D(HWND hWnd)
|
|||||||
if (res != S_OK)
|
if (res != S_OK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Disable DXGI's default Alt+Enter fullscreen behavior.
|
||||||
|
// - You are free to leave this enabled, but it will not work properly with multiple viewports.
|
||||||
|
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
|
||||||
|
IDXGIFactory* pSwapChainFactory;
|
||||||
|
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
|
||||||
|
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
|
||||||
|
|
||||||
CreateRenderTarget();
|
CreateRenderTarget();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -245,6 +245,13 @@ bool CreateDeviceD3D(HWND hWnd)
|
|||||||
if (res != S_OK)
|
if (res != S_OK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Disable DXGI's default Alt+Enter fullscreen behavior.
|
||||||
|
// - You are free to leave this enabled, but it will not work properly with multiple viewports.
|
||||||
|
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
|
||||||
|
IDXGIFactory* pSwapChainFactory;
|
||||||
|
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
|
||||||
|
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
|
||||||
|
|
||||||
CreateRenderTarget();
|
CreateRenderTarget();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user