diff options
author | Mike Will <myQwil@gmail.com> | 2023-09-24 17:28:37 -0400 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-25 16:07:34 +0000 |
commit | 9cd2a9fc48ea92cf45e2925e7ed65152e377aea2 (patch) | |
tree | 07f129964c75255b1feefe9c43822de5da6ae6e8 | |
parent | 3665b8d1d867d46746893d5d257fcc4e777d4f0f (diff) | |
download | mpv-9cd2a9fc48ea92cf45e2925e7ed65152e377aea2.tar.bz2 mpv-9cd2a9fc48ea92cf45e2925e7ed65152e377aea2.tar.xz |
osc.lua: fix calculation for slider's min-max average
Average of two numbers is given by the sum of the two numbers
divided by two. It's gone unnoticed because `s_min` is
basically always zero.
-rw-r--r-- | player/lua/osc.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 0a9965b269..1bfe82d9bb 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -818,7 +818,7 @@ function render_elements(master_ass) elseif (sliderpos > (s_max - 3)) then an = an + 1 end - elseif (sliderpos > (s_max-s_min)/2) then + elseif (sliderpos > (s_max+s_min)/2) then an = an + 1 tx = tx - 5 else |