[vlc-devel] [PATCH 1/2] win32: update video position slider when it is clicked
Daniel Amm
da2424 at t-online.de
Mon May 25 18:36:50 CEST 2015
---
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
More information about the vlc-devel
mailing list