[vlc-devel] [PATCH 4/6] win32: set video slider range to 1000

Daniel Amm da2424 at t-online.de
Tue Dec 15 22:15:35 CET 2015


To allow a more accurate seeking with the slider
---
 common/win32_fullscreen.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/common/win32_fullscreen.cpp b/common/win32_fullscreen.cpp
index b5f3251..dde488f 100644
--- a/common/win32_fullscreen.cpp
+++ b/common/win32_fullscreen.cpp
@@ -166,6 +166,7 @@ LRESULT VLCControlsWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
                 FreeLibrary(hThModule);
             }
             HorizontalOffset+=ControlWidth+xControlsSpace;
+            SendMessage(hVideoPosScroll, (UINT)PBM_SETRANGE, 0, MAKELPARAM(0, 1000));
 
             ControlWidth = ButtonsWidth;
             hMuteButton =
@@ -394,7 +395,7 @@ LRESULT VLCControlsWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
 void VLCControlsWnd::RegisterToVLCEvents()
 {
     VP()->get_mp().eventManager().onPositionChanged([this](float pos) {
-        PostMessage(hVideoPosScroll, (UINT) PBM_SETPOS, (WPARAM)(pos * 100), 0);
+        PostMessage(hVideoPosScroll, (UINT) PBM_SETPOS, (WPARAM)(pos * 1000), 0);
     });
 
     VP()->get_mp().eventManager().onPlaying([this] {
@@ -451,7 +452,7 @@ void VLCControlsWnd::SetVideoPos(float Pos) //0-start, 1-end
         VP()->get_mp().setPosition( Pos );
 
         if( VP()->get_mp().length() > 0 )
-            PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (Pos * 100), 0);
+            PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (Pos * 1000), 0);
     }
 }
 
-- 
2.6.3.windows.1



More information about the vlc-devel mailing list