fix: prepare for shared-script-properties removal (#640)
mpv is about to remove `shared-script-properties`, which will cause `utils.shared_script_property_set` to be nil. Check for it's existence before calling it.
This commit is contained in:

committed by
GitHub

parent
f067ea336e
commit
22d45b6c3b
@@ -589,7 +589,9 @@ function update_margins()
|
|||||||
state.margin_left = left
|
state.margin_left = left
|
||||||
state.margin_right = right
|
state.margin_right = right
|
||||||
|
|
||||||
utils.shared_script_property_set('osc-margins', string.format('%f,%f,%f,%f', 0, 0, top, bottom))
|
if utils.shared_script_property_set then
|
||||||
|
utils.shared_script_property_set('osc-margins', string.format('%f,%f,%f,%f', 0, 0, top, bottom))
|
||||||
|
end
|
||||||
mp.set_property_native('user-data/osc/margins', { l = left, r = right, t = top, b = bottom })
|
mp.set_property_native('user-data/osc/margins', { l = left, r = right, t = top, b = bottom })
|
||||||
|
|
||||||
if not options.adjust_osd_margins then return end
|
if not options.adjust_osd_margins then return end
|
||||||
|
Reference in New Issue
Block a user