[vlc-devel] [PATCH 1/2] win32: update video position slider when it is clicked

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


Applied and the followings

On 25 May, Daniel Amm wrote :
> ---
>  common/win32_fullscreen.cpp | 8 +++-----
>  common/win32_fullscreen.h   | 1 -
>  2 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/common/win32_fullscreen.cpp b/common/win32_fullscreen.cpp
> index fad5c1d..71bb1f8 100644
> --- a/common/win32_fullscreen.cpp
> +++ b/common/win32_fullscreen.cpp
> @@ -422,15 +422,13 @@ void VLCControlsWnd::NeedHideControls()
>      KillTimer(hWnd(), 1);
>  }
>  
> -void VLCControlsWnd::SetVideoPosScrollPosByVideoPos(libvlc_time_t CurScrollPos)
> -{
> -    PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (CurScrollPos >> VideoPosShiftBits), 0);
> -}
> -
>  void VLCControlsWnd::SetVideoPos(float Pos) //0-start, 1-end
>  {
>      if( VP() ){
>          VP()->get_mp().setPosition( Pos );
> +
> +        if( VP()->get_mp().length() > 0 )
> +            PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (Pos * 100), 0);
>      }
>  }
>  
> diff --git a/common/win32_fullscreen.h b/common/win32_fullscreen.h
> index e5bba00..c1ff55e 100644
> --- a/common/win32_fullscreen.h
> +++ b/common/win32_fullscreen.h
> @@ -109,7 +109,6 @@ private:
>  
>      void SyncVolumeSliderWithVLCVolume();
>      void SetVLCVolumeBySliderPos(int CurScrollPos);
> -    void SetVideoPosScrollPosByVideoPos(libvlc_time_t CurScrollPos);
>      void RegisterToVLCEvents();
>  
>      void NeedHideControls();
> -- 
> 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