dxgi: Release target output when releasing swapchain.

It should never happen because applications are required to call
SetFullscreenState() to exit fullscreen mode before releasing the
swapchain.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-08-28 22:30:54 +02:00 committed by Alexandre Julliard
parent 7c5f60f2d8
commit a1b0752585

View file

@ -78,6 +78,11 @@ static ULONG STDMETHODCALLTYPE dxgi_swapchain_Release(IDXGISwapChain *iface)
if (!refcount)
{
IWineDXGIDevice *device = swapchain->device;
if (swapchain->target)
{
WARN("Releasing fullscreen swapchain.\n");
IDXGIOutput_Release(swapchain->target);
}
if (swapchain->factory)
IDXGIFactory_Release(swapchain->factory);
wined3d_mutex_lock();