mirror of
https://github.com/mpv-player/mpv
synced 2025-02-19 14:26:57 +00:00
console.lua: guard user-data/osc/margins value
Defaults margins to 0 if an external script sets this to an invalid value.
This commit is contained in:
parent
9133ce7623
commit
0818f6001c
@ -1754,7 +1754,7 @@ mp.observe_property('display-hidpi-scale', 'native', update)
|
||||
mp.observe_property('focused', 'native', update)
|
||||
|
||||
mp.observe_property("user-data/osc/margins", "native", function(_, val)
|
||||
if val then
|
||||
if type(val) == "table" and type(val.t) == "number" and type(val.b) == "number" then
|
||||
global_margins = val
|
||||
else
|
||||
global_margins = { t = 0, b = 0 }
|
||||
|
Loading…
Reference in New Issue
Block a user