Commit 7c5f60f2 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

dxgi: Update swapchain fullscreen state when state change is successful.

parent 35537b1d
......@@ -229,17 +229,24 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH dxgi_swapchain_SetFullscreenS
}
}
swapchain->fullscreen = fullscreen;
if (swapchain->target)
IDXGIOutput_Release(swapchain->target);
swapchain->target = target;
wined3d_mutex_lock();
wined3d_swapchain_get_desc(swapchain->wined3d_swapchain, &swapchain_desc);
swapchain_desc.windowed = !fullscreen;
hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain, &swapchain_desc, NULL);
wined3d_mutex_unlock();
if (SUCCEEDED(hr))
{
swapchain->fullscreen = fullscreen;
if (swapchain->target)
IDXGIOutput_Release(swapchain->target);
swapchain->target = target;
}
else
{
IDXGIOutput_Release(target);
}
return hr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment