Work around an mpv race condition bug during pause on windows builds

ref #44
This commit is contained in:
Tomas Sardyha
2020-11-30 17:33:07 +01:00
parent 755194352f
commit 6b3d32dcb3

View File

@@ -2203,6 +2203,10 @@ elements:add('pause_indicator', Element.new({
if this.is_manual then this.type = 'static' end
this.opacity = this.paused and 1 or 0
request_render()
-- works around an mpv race condition bug during pause on windows builds, which cause osd updates to be ignored
-- .03 was still loosing renders, .04 was fine, but to be safe I added 10ms more
mp.add_timeout(.05, function() osd:update() end)
end,
render = function(this)
if this.opacity == 0 then return end