1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

osc: move the idle logo behind other overlays

The default `z` of an overlay is 0, which is used by e.g. console.lua.
Having the idle logo at a `z` of 1000 means that it ends up above the
console (and anything that don't set a value higher then 1000).
It doesn't make sense for the idle logo to overshadow other things, so
put it at -1000 instead to prevent that.
This commit is contained in:
Christoph Heinrich 2023-09-27 23:10:11 +02:00 committed by Dudemanguy
parent 6b74b55283
commit 9c22d6b438

View File

@ -148,7 +148,7 @@ function kill_animation()
state.anitype = nil
end
function set_osd(res_x, res_y, text)
function set_osd(res_x, res_y, text, z)
if state.osd.res_x == res_x and
state.osd.res_y == res_y and
state.osd.data == text then
@ -157,7 +157,7 @@ function set_osd(res_x, res_y, text)
state.osd.res_x = res_x
state.osd.res_y = res_y
state.osd.data = text
state.osd.z = 1000
state.osd.z = z
state.osd:update()
end
@ -2480,7 +2480,7 @@ function render()
-- submit
set_osd(osc_param.playresy * osc_param.display_aspect,
osc_param.playresy, ass.text)
osc_param.playresy, ass.text, 1000)
end
--
@ -2636,7 +2636,7 @@ function tick()
ass:an(8)
ass:append("Drop files or URLs to play here.")
end
set_osd(display_w, display_h, ass.text)
set_osd(display_w, display_h, ass.text, -1000)
if state.showhide_enabled then
mp.disable_key_bindings("showhide")