d3d11window: Set DXGI_PRESENT_ALLOW_TEARING only in fullscreen mode

The DXGI_PRESENT_ALLOW_TEARING flag might cause unexpected tearing
side effect. Setting it in fullscreen mode only seems to be
the correct usage as in the Microsoft's direct3d examples.
This commit is contained in:
Seungha Yang 2020-02-26 13:11:30 +09:00
parent 54d8360baa
commit f2e322197e

View file

@ -849,7 +849,7 @@ gst_d3d111_window_present (GstD3D11Window * self, GstBuffer * buffer)
gst_d3d11_overlay_compositor_draw_unlocked (self->compositor, &self->rtv);
#if (DXGI_HEADER_VERSION >= 5)
if (self->allow_tearing) {
if (self->allow_tearing && self->fullscreen) {
present_flags |= DXGI_PRESENT_ALLOW_TEARING;
}
#endif