diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2021-09-13 16:51:25 +0300 |
---|---|---|
committer | avih <avih@users.noreply.github.com> | 2021-10-03 19:52:58 +0300 |
commit | bc6dab6d92203131a2666cf83f23907c10aa5134 (patch) | |
tree | fca9af0133d180bdc73ef57fd5d6fde80ea303bd /player/lua | |
parent | c3a647ffee716604f69261bdf0450249e8c447a5 (diff) | |
download | mpv-bc6dab6d92203131a2666cf83f23907c10aa5134.tar.bz2 mpv-bc6dab6d92203131a2666cf83f23907c10aa5134.tar.xz |
osc.lua: unify animation reset function (no-op)
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/osc.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 18e8d4e048..4d37d766d3 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -132,6 +132,12 @@ local is_december = os.date("*t").month == 12 -- Helperfunctions -- +function kill_animation() + state.anistart = nil + state.animation = nil + state.anitype = nil +end + function set_osd(res_x, res_y, text) if state.osd.res_x == res_x and state.osd.res_y == res_y and @@ -2339,14 +2345,10 @@ function render() if (state.anitype == "out") then osc_visible(false) end - state.anistart = nil - state.animation = nil - state.anitype = nil + kill_animation() end else - state.anistart = nil - state.animation = nil - state.anitype = nil + kill_animation() end --mouse show/hide area |