Commit e3b56a83 authored by Daniel Amm's avatar Daniel Amm Committed by 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's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 96364b48
...@@ -166,6 +166,7 @@ LRESULT VLCControlsWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -166,6 +166,7 @@ LRESULT VLCControlsWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
FreeLibrary(hThModule); FreeLibrary(hThModule);
} }
HorizontalOffset+=ControlWidth+xControlsSpace; HorizontalOffset+=ControlWidth+xControlsSpace;
SendMessage(hVideoPosScroll, (UINT)PBM_SETRANGE, 0, MAKELPARAM(0, 1000));
ControlWidth = ButtonsWidth; ControlWidth = ButtonsWidth;
hMuteButton = hMuteButton =
...@@ -386,7 +387,7 @@ LRESULT VLCControlsWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -386,7 +387,7 @@ LRESULT VLCControlsWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
void VLCControlsWnd::RegisterToVLCEvents() void VLCControlsWnd::RegisterToVLCEvents()
{ {
VP()->get_mp().eventManager().onPositionChanged([this](float pos) { 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] { VP()->get_mp().eventManager().onPlaying([this] {
...@@ -429,7 +430,7 @@ void VLCControlsWnd::SetVideoPos(float Pos) //0-start, 1-end ...@@ -429,7 +430,7 @@ void VLCControlsWnd::SetVideoPos(float Pos) //0-start, 1-end
VP()->get_mp().setPosition( Pos ); VP()->get_mp().setPosition( Pos );
if( VP()->get_mp().length() > 0 ) if( VP()->get_mp().length() > 0 )
PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (Pos * 100), 0); PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (Pos * 1000), 0);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment