Skip to content

Commit

Permalink
Update custom-osc.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
samhippo authored Apr 28, 2020
1 parent cc816d9 commit ab24764
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions custom-osc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ function mouseMove()
mp.commandv('osd-msg-bar','show-progress')
end

if(dragging == true) then
if(dragging == true) then
local x, y = mp.get_mouse_pos()
local diff = (prevX - x) * .5;
mp.commandv('osd-msg-bar','seek',diff)
prevX = x
local diff = (prevX - x);
if(diff > 2) then
mp.commandv('osd-msg-bar','seek',.5)
prevX = x
elseif (diff < -2) then
mp.commandv('osd-msg-bar','seek',-.5)
prevX = x
end
end
end

Expand Down

0 comments on commit ab24764

Please sign in to comment.