mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 18:02:36 +00:00
osc: set values in user-data in addition to shared-script-properties
This commit is contained in:
parent
048d4d8b75
commit
894f0c28eb
@ -2195,11 +2195,13 @@ function update_margins()
|
||||
|
||||
utils.shared_script_property_set("osc-margins",
|
||||
string.format("%f,%f,%f,%f", margins.l, margins.r, margins.t, margins.b))
|
||||
mp.set_property_native("user-data/osc/margins", margins)
|
||||
end
|
||||
|
||||
function shutdown()
|
||||
reset_margins()
|
||||
utils.shared_script_property_set("osc-margins", nil)
|
||||
mp.del_property("user-data/osc")
|
||||
end
|
||||
|
||||
--
|
||||
@ -2853,6 +2855,7 @@ function visibility_mode(mode, no_osd)
|
||||
|
||||
user_opts.visibility = mode
|
||||
utils.shared_script_property_set("osc-visibility", mode)
|
||||
mp.set_property_native("user-data/osc/visibility", mode)
|
||||
|
||||
if not no_osd and tonumber(mp.get_property("osd-level")) >= 1 then
|
||||
mp.osd_message("OSC visibility: " .. mode)
|
||||
@ -2885,6 +2888,7 @@ function idlescreen_visibility(mode, no_osd)
|
||||
end
|
||||
|
||||
utils.shared_script_property_set("osc-idlescreen", mode)
|
||||
mp.set_property_native("user-data/osc/idlescreen", user_opts.idlescreen)
|
||||
|
||||
if not no_osd and tonumber(mp.get_property("osd-level")) >= 1 then
|
||||
mp.osd_message("OSC logo visibility: " .. tostring(mode))
|
||||
|
Loading…
Reference in New Issue
Block a user