[vlc-devel] [PATCH] - msw(directx) fullscreen support (new api)
Laurent Aimar
fenrir at via.ecp.fr
Sun Dec 27 18:35:35 CET 2009
Hi,
On Sun, Dec 27, 2009, brezhoneg1 wrote:
> From 76d1516aec6f6382d07cc09a1d56dd43e015d090 Mon Sep 17 00:00:00 2001
> From: Erwan Tulou <erwan10 at videolan.org>
> Date: Thu, 24 Dec 2009 11:43:10 +0100
> Subject: [PATCH] msw(directx) : support for vout_window_SetFullscreen
>
> This patch opts for the new vout_window_SetFullscreen when a vout window
> provider is available and keeps on the old way otherwise
> ---
> modules/video_output/msw/common_vo.c | 13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/modules/video_output/msw/common_vo.c b/modules/video_output/msw/common_vo.c
> index f2bbc97..5485185 100644
> --- a/modules/video_output/msw/common_vo.c
> +++ b/modules/video_output/msw/common_vo.c
> @@ -142,7 +142,7 @@ void CommonManage( vout_thread_t *p_vout )
> {
> /* If we do not control our window, we check for geometry changes
> * ourselves because the parent might not send us its events. */
> - if( p_vout->p_sys->hparent && !p_vout->b_fullscreen )
> + if( p_vout->p_sys->hparent )
I don't understand the need here.
> RECT rect_parent;
> POINT point;
> @@ -242,7 +242,16 @@ void CommonManage( vout_thread_t *p_vout )
> if( p_vout->i_changes & VOUT_FULLSCREEN_CHANGE
> || p_vout->p_sys->i_changes & VOUT_FULLSCREEN_CHANGE )
> {
> - Win32ToggleFullscreen( p_vout );
> + if( p_vout->p_sys->parent_window )
> + {
> + p_vout->b_fullscreen = !p_vout->b_fullscreen;
> + vout_window_SetFullScreen( p_vout->p_sys->parent_window,
> + p_vout->b_fullscreen );
> + }
> + else
> + {
> + Win32ToggleFullscreen( p_vout );
> + }
I think it would be better to modify Win32ToggleFullscreen() directly as
it is called more than once (as alreay done by in new common.c), no ?
Regards,
--
fenrir
More information about the vlc-devel
mailing list