d3d11videosink: Fix rendering with initial fullscreen state

Change fullscreen mode once the swapchain is fully configured

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5466>
This commit is contained in:
Seungha Yang 2023-10-12 02:26:07 +09:00 committed by GStreamer Marge Bot
parent 07a2f7ebcc
commit 4b932ee989

View file

@ -1222,6 +1222,9 @@ gst_d3d11_window_win32_show (GstD3D11Window * window)
PostMessageA (self->internal_hwnd, WM_GST_D3D11_SHOW_WINDOW, 0, 0);
}
if (g_atomic_int_get (&self->pending_fullscreen_count) > 0)
PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0);
self->visible = TRUE;
}
}
@ -1289,7 +1292,8 @@ gst_d3d11_window_win32_change_fullscreen_mode (GstD3D11Window * window)
if (self->internal_hwnd) {
g_atomic_int_add (&self->pending_fullscreen_count, 1);
PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0);
if (self->visible)
PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0);
}
}