[vlc-commits] win32: set video slider range to 1000

Daniel Amm git at videolan.org
Wed Dec 16 17:46:27 CET 2015


npapi-vlc | branch: master | Daniel Amm <da2424 at t-online.de> | Tue Dec 15 22:15:35 2015 +0100| [e3b56a83470d0e424a510db97198ced1cd37de57] | committer: Jean-Baptiste Kempf

win32: set video slider range to 1000

To allow a more accurate seeking with the slider

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> https://code.videolan.org/videolan/npapi-vlc/commit/e3b56a83470d0e424a510db97198ced1cd37de57
---

 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 c801760..11d83c4 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 =
@@ -386,7 +387,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] {
@@ -429,7 +430,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);
     }
 }
 



More information about the vlc-commits mailing list