dxgi: Update swapchain fullscreen state when state change is successful.
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:
parent
35537b1d45
commit
7c5f60f2d8
|
@ -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_mutex_lock();
|
||||||
wined3d_swapchain_get_desc(swapchain->wined3d_swapchain, &swapchain_desc);
|
wined3d_swapchain_get_desc(swapchain->wined3d_swapchain, &swapchain_desc);
|
||||||
swapchain_desc.windowed = !fullscreen;
|
swapchain_desc.windowed = !fullscreen;
|
||||||
hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain, &swapchain_desc, NULL);
|
hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain, &swapchain_desc, NULL);
|
||||||
wined3d_mutex_unlock();
|
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;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue