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/5462>
This commit is contained in:
Seungha Yang 2023-10-12 02:26:07 +09:00 committed by GStreamer Marge Bot
parent 15248d8b84
commit 7b564619cf

View file

@ -1210,6 +1210,9 @@ gst_d3d11_window_win32_show (GstD3D11Window * window)
PostMessageA (self->internal_hwnd, WM_GST_D3D11_SHOW_WINDOW, 0, 0); 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; self->visible = TRUE;
} }
} }
@ -1277,6 +1280,7 @@ gst_d3d11_window_win32_change_fullscreen_mode (GstD3D11Window * window)
if (self->internal_hwnd) { if (self->internal_hwnd) {
g_atomic_int_add (&self->pending_fullscreen_count, 1); g_atomic_int_add (&self->pending_fullscreen_count, 1);
if (self->visible)
PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0); PostMessageA (self->internal_hwnd, WM_GST_D3D11_FULLSCREEN, 0, 0);
} }
} }