mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 10:17:31 +00:00
osc: skip rendering when osd_dimensions are 0
The idle logo could appear on the left side of the window for a split second after starting. That is because when osd dimensions can be reported as 0 at the very beginning. Since the width gets calculated based on a fixed height and the aspect ratio, which is 0, that results in a width of 0 until the next update.
This commit is contained in:
parent
9feeb324ed
commit
b7ffe0d16e
@ -2594,6 +2594,9 @@ function tick()
|
||||
-- render idle message
|
||||
msg.trace("idle message")
|
||||
local _, _, display_aspect = mp.get_osd_size()
|
||||
if display_aspect == 0 then
|
||||
return
|
||||
end
|
||||
local display_h = 360
|
||||
local display_w = display_h * display_aspect
|
||||
-- logo is rendered at 2^(6-1) = 32 times resolution with size 1800x1800
|
||||
|
Loading…
Reference in New Issue
Block a user