summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-12-19 12:53:37 +0100
committerwm4 <wm4@nowhere>2019-12-19 12:53:37 +0100
commitc4ae7d82036e8533a52281819ac78a186827515b (patch)
tree8031ae47ebcc91f9c23854b92d2ef98ad61922bb
parent3ed96cca883f659c87d591334f345cbec9e2db85 (diff)
downloadmpv-c4ae7d82036e8533a52281819ac78a186827515b.tar.bz2
mpv-c4ae7d82036e8533a52281819ac78a186827515b.tar.xz
osc: don't run update_margins() every frame
This is something recent that also caused per frame log spam, because it tried to update the margins every frame.
-rw-r--r--player/lua/osc.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 93da61a759..78686df99b 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -2131,9 +2131,11 @@ function hide_osc()
end
function osc_visible(visible)
- state.osc_visible = visible
+ if state.osc_visible ~= visible then
+ state.osc_visible = visible
+ update_margins()
+ end
request_tick()
- update_margins()
end
function pause_state(name, enabled)