From 9c22d6b4382f46ed04d0daa3f8dceb96fd56f0b2 Mon Sep 17 00:00:00 2001 From: Christoph Heinrich Date: Wed, 27 Sep 2023 23:10:11 +0200 Subject: [PATCH] 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. --- player/lua/osc.lua | 8 ++++---- 1 file 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")