From ef5f4b4d9ac69abe139e47e132c0c36743a8780a Mon Sep 17 00:00:00 2001 From: torque Date: Thu, 27 Aug 2015 17:15:35 -0700 Subject: osc: exit tick immediately if disabled. Even after it has been disabled with the `disable-osc` message, the OSC continues to run the tick function. Completely preventing tick from being called is impractical since there are several different places that it's called in the code, so just make it immediately return if the OSC has been disabled. This prevents the OSC from continuing the clear the OSD on every tick, allowing other scripts to disable it so that they may draw to the OSD. --- player/lua/osc.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 3301df3f36..7ae7fd0a3e 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -1895,6 +1895,8 @@ end -- called by mpv on every frame function tick() + if (not state.enabled) then return end + if (state.idle) then -- render idle message -- cgit v1.2.3