dxgi: Properly switch to fullscreen mode when creating fullscreen swapchains.

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-15 16:00:21 +02:00 committed by Alexandre Julliard
parent 2c67e1c9c3
commit 0d92a9a7a4
1 changed files with 3 additions and 1 deletions

View File

@ -485,6 +485,8 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
wined3d_mutex_lock();
wined3d_private_store_init(&swapchain->private_store);
swapchain->fullscreen = !desc->windowed;
desc->windowed = TRUE;
if (FAILED(hr = wined3d_swapchain_create(device->wined3d_device, desc, swapchain,
&dxgi_swapchain_wined3d_parent_ops, &swapchain->wined3d_swapchain)))
{
@ -492,10 +494,10 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
goto cleanup;
}
swapchain->fullscreen = !desc->windowed;
swapchain->target = NULL;
if (swapchain->fullscreen)
{
desc->windowed = FALSE;
if (FAILED(hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain,
desc, NULL)))
{