[PATCH 06/11] dxgi: Switch display mode when creating fullscreen swapchains.
Józef Kucia
joseph.kucia at gmail.com
Tue Aug 2 06:07:17 CDT 2016
On Tue, Aug 2, 2016 at 12:46 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 1 August 2016 at 22:28, Józef Kucia <jkucia at codeweavers.com> wrote:
>> + if (swapchain->fullscreen)
>> + {
>> + if (FAILED(hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain,
>> + desc, NULL)))
>> + {
>> + WARN("Failed to set fullscreen state, hr %#x.\n", hr);
>> + wined3d_swapchain_decref(swapchain->wined3d_swapchain);
>> + goto cleanup;
>> + }
>> +
>> + if (FAILED(hr = IDXGISwapChain_GetContainingOutput(&swapchain->IDXGISwapChain_iface,
>> + &swapchain->target)))
>> + {
>> + struct wined3d_swapchain_desc wined3d_desc = *desc;
>> + WARN("Failed to get target output for fullscreen swapchain, hr %#x.\n", hr);
>> + wined3d_desc.windowed = FALSE;
>> + if (FAILED(hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain,
>> + &wined3d_desc, NULL)))
> Is this needed, or should swapchain destruction take care of this?
In native DXGI it is illegal to destroy swapchain before switching
back to windowed mode (DXGI raises a non-continuable exception). If we
want to allow this, swapchain destruction will have to take care about
restoring window rect when leaving fullscreen mode.
More information about the wine-devel
mailing list