mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
d3d11window_win32: Let DXGI choose client area
Don't specify the resolution of backbuffer. Then dxgi will let us know the actual client area. When upstream resolution is chagned, updating the size of backbuffer without the consideration for client size would cause mismatch between them.
This commit is contained in:
parent
d393232bc2
commit
e97ef8a562
2 changed files with 2 additions and 2 deletions
|
@ -306,7 +306,6 @@ gst_d3d11_window_on_resize (GstD3D11Window * window, guint width, guint height)
|
|||
window->rtv = NULL;
|
||||
}
|
||||
|
||||
/* Set zero width and height here. dxgi will decide client area by itself */
|
||||
swap_chain->GetDesc (&swap_desc);
|
||||
hr = swap_chain->ResizeBuffers (0, width, height, DXGI_FORMAT_UNKNOWN,
|
||||
swap_desc.Flags);
|
||||
|
|
|
@ -790,7 +790,8 @@ gst_d3d11_window_win32_create_swap_chain (GstD3D11Window * window,
|
|||
|
||||
*swap_chain = new_swapchain;
|
||||
|
||||
gst_d3d11_window_on_resize (window, width, height);
|
||||
/* Set zero width and height here. dxgi will decide client area by itself */
|
||||
gst_d3d11_window_on_resize (window, 0, 0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue