summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Heinrich <christoph.heinrich@student.tugraz.at>2023-09-27 23:10:11 +0200
committerDudemanguy <random342@airmail.cc>2023-09-27 23:05:53 +0000
commit9c22d6b4382f46ed04d0daa3f8dceb96fd56f0b2 (patch)
treeb7324ca92f240387cc3e42a8e832efd5673dae8e
parent6b74b55283cd4f78138b0b7e8143263d091823d8 (diff)
downloadmpv-9c22d6b4382f46ed04d0daa3f8dceb96fd56f0b2.tar.bz2
mpv-9c22d6b4382f46ed04d0daa3f8dceb96fd56f0b2.tar.xz
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.
-rw-r--r--player/lua/osc.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index d5aa736de7..dc387f65f1 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -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")