wined3d: Restore display mode for the previous output before changing to another output.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7962c3194e
commit
b6495fa31d
|
@ -1434,6 +1434,21 @@ static HRESULT wined3d_swapchain_state_set_display_mode(struct wined3d_swapchain
|
|||
}
|
||||
}
|
||||
|
||||
if (output != state->desc.output)
|
||||
{
|
||||
if (FAILED(hr = wined3d_output_set_display_mode(state->desc.output, &state->original_mode)))
|
||||
{
|
||||
WARN("Failed to set display mode, hr %#x.\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (FAILED(hr = wined3d_output_get_display_mode(output, &state->original_mode, NULL)))
|
||||
{
|
||||
WARN("Failed to get current display mode, hr %#x.\n", hr);
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(hr = wined3d_output_set_display_mode(output, mode)))
|
||||
{
|
||||
WARN("Failed to set display mode, hr %#x.\n", hr);
|
||||
|
|
Loading…
Reference in New Issue