diff options
author | wm4 <wm4@nowhere> | 2019-12-19 12:53:37 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-12-19 12:53:37 +0100 |
commit | c4ae7d82036e8533a52281819ac78a186827515b (patch) | |
tree | 8031ae47ebcc91f9c23854b92d2ef98ad61922bb /player/lua/osc.lua | |
parent | 3ed96cca883f659c87d591334f345cbec9e2db85 (diff) | |
download | mpv-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.
Diffstat (limited to 'player/lua/osc.lua')
-rw-r--r-- | player/lua/osc.lua | 6 |
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) |