On 1 August 2016 at 22:28, Józef Kucia jkucia@codeweavers.com wrote:
- if (swapchain->fullscreen)
- {
if (FAILED(hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain,
desc, NULL)))
{
WARN("Failed to set fullscreen state, hr %#x.\n", hr);
wined3d_swapchain_decref(swapchain->wined3d_swapchain);
goto cleanup;
}
if (FAILED(hr = IDXGISwapChain_GetContainingOutput(&swapchain->IDXGISwapChain_iface,
&swapchain->target)))
{
struct wined3d_swapchain_desc wined3d_desc = *desc;
WARN("Failed to get target output for fullscreen swapchain, hr %#x.\n", hr);
wined3d_desc.windowed = FALSE;
if (FAILED(hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain,
&wined3d_desc, NULL)))
Is this needed, or should swapchain destruction take care of this?
On Tue, Aug 2, 2016 at 12:46 PM, Henri Verbeet hverbeet@gmail.com wrote:
On 1 August 2016 at 22:28, Józef Kucia jkucia@codeweavers.com wrote:
- if (swapchain->fullscreen)
- {
if (FAILED(hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain,
desc, NULL)))
{
WARN("Failed to set fullscreen state, hr %#x.\n", hr);
wined3d_swapchain_decref(swapchain->wined3d_swapchain);
goto cleanup;
}
if (FAILED(hr = IDXGISwapChain_GetContainingOutput(&swapchain->IDXGISwapChain_iface,
&swapchain->target)))
{
struct wined3d_swapchain_desc wined3d_desc = *desc;
WARN("Failed to get target output for fullscreen swapchain, hr %#x.\n", hr);
wined3d_desc.windowed = FALSE;
if (FAILED(hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain,
&wined3d_desc, NULL)))
Is this needed, or should swapchain destruction take care of this?
In native DXGI it is illegal to destroy swapchain before switching back to windowed mode (DXGI raises a non-continuable exception). If we want to allow this, swapchain destruction will have to take care about restoring window rect when leaving fullscreen mode.