npapi-vlc | branch: master | Daniel Amm <[email protected]> | Mon May 25 18:36:50 2015 +0200| [a47898cf7d954254d70afbb1e8eb1686818c4d2a] | committer: Jean-Baptiste Kempf
win32: update video position slider when it is clicked Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=a47898cf7d954254d70afbb1e8eb1686818c4d2a --- 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(); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
