[vlc-commits] win32: update video position slider when it is clicked
Daniel Amm
git at videolan.org
Tue May 26 12:11:31 CEST 2015
npapi-vlc | branch: master | Daniel Amm <da2424 at t-online.de> | 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 <jb at videolan.org>
> 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();
More information about the vlc-commits
mailing list