[vlc-devel] [PATCH] activex: fix handling of fullscreen mode

Jean-Baptiste Kempf jb at videolan.org
Thu May 28 17:56:35 CEST 2015


Applied. Thanks.

On 21 May, Daniel Amm wrote :
> ---
>  activex/plugin.cpp      | 13 +++++++++++++
>  activex/plugin.h        |  2 ++
>  activex/vlccontrol2.cpp |  6 +++---
>  3 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/activex/plugin.cpp b/activex/plugin.cpp
> index 9357a98..96acacc 100644
> --- a/activex/plugin.cpp
> +++ b/activex/plugin.cpp
> @@ -689,6 +689,19 @@ void VLCPlugin::toggleFullscreen()
>      _WindowsManager.ToggleFullScreen();
>  }
>  
> +void VLCPlugin::setFullscreen(BOOL yes)
> +{
> +    if( yes )
> +        _WindowsManager.StartFullScreen();
> +    else
> +        _WindowsManager.EndFullScreen();
> +}
> +
> +BOOL VLCPlugin::getFullscreen()
> +{
> +    return _WindowsManager.IsFullScreen();
> +}
> +
>  HRESULT VLCPlugin::onInPlaceDeactivate(void)
>  {
>      if( m_player.mlp().isPlaying() )
> diff --git a/activex/plugin.h b/activex/plugin.h
> index 441afd5..6364c34 100644
> --- a/activex/plugin.h
> +++ b/activex/plugin.h
> @@ -218,6 +218,8 @@ public:
>      RECT getPosRect(void) { return _posRect; };
>      inline HWND getInPlaceWindow(void) const { return _inplacewnd; };
>      void toggleFullscreen();
> +    void setFullscreen(BOOL yes);
> +    BOOL getFullscreen();
>  
>      BOOL isInPlaceActive(void);
>  
> diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
> index 284228e..0315237 100644
> --- a/activex/vlccontrol2.cpp
> +++ b/activex/vlccontrol2.cpp
> @@ -920,13 +920,13 @@ STDMETHODIMP VLCVideo::get_fullscreen(VARIANT_BOOL* fullscreen)
>      if( NULL == fullscreen )
>          return E_POINTER;
>  
> -    *fullscreen = _plug->get_player().get_mp().fullscreen();
> +    *fullscreen = _plug->getFullscreen();
>      return S_OK;
>  }
>  
>  STDMETHODIMP VLCVideo::put_fullscreen(VARIANT_BOOL fullscreen)
>  {
> -    _plug->get_player().get_mp().setFullscreen( VARIANT_FALSE != fullscreen );
> +    _plug->setFullscreen( VARIANT_FALSE != fullscreen );
>      return S_OK;
>  }
>  
> @@ -1133,7 +1133,7 @@ STDMETHODIMP VLCVideo::takeSnapshot(LPPICTUREDISP* picture)
>  
>  STDMETHODIMP VLCVideo::toggleFullscreen()
>  {
> -    _plug->get_player().get_mp().toggleFullscreen();
> +    _plug->toggleFullscreen();
>      return S_OK;
>  }
>  
> -- 
> 2.1.4
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list