Commit 0d92a9a7 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

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

parent 2c67e1c9
......@@ -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)))
{
......
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