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.
This commit is contained in:
torque
2015-08-27 17:15:35 -07:00
committed by wm4
parent c61675320b
commit ef5f4b4d9a

View File

@@ -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