diff options
-rw-r--r-- | player/lua/osc.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 8196574372..8f694e8e06 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -2051,6 +2051,11 @@ end function update_margins() local margins = osc_param.video_margins + -- Don't use margins if it's visible only temporarily. + if (not state.osc_visible) or (get_hidetimeout() >= 0) then + margins = {l = 0, r = 0, t = 0, b = 0} + end + if user_opts.boxvideo then -- check whether any margin option has a non-default value local margins_used = false @@ -2076,12 +2081,6 @@ function update_margins() reset_margins() end - -- Don't report margins if it's visible only temporarily. At least for - -- console.lua this makes no sense. - if (not state.osc_visible) or (get_hidetimeout() >= 0) then - margins = {l = 0, r = 0, t = 0, b = 0} - end - utils.shared_script_property_set("osc-margins", string.format("%f,%f,%f,%f", margins.l, margins.r, margins.t, margins.b)) end |