mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Fixed the error screen sometimes not properly appearing until the next input event due to double/triple-buffering
This commit is contained in:
+22
-18
@@ -778,21 +778,23 @@ function love.errhand(msg)
|
||||
love.graphics.present()
|
||||
end
|
||||
|
||||
draw()
|
||||
|
||||
local e, a, b, c
|
||||
while true do
|
||||
e, a, b, c = love.event.wait()
|
||||
love.event.pump()
|
||||
|
||||
if e == "quit" then
|
||||
return
|
||||
end
|
||||
if e == "keypressed" and a == "escape" then
|
||||
return
|
||||
for e, a, b, c in love.event.poll() do
|
||||
if e == "quit" then
|
||||
return
|
||||
end
|
||||
if e == "keypressed" and a == "escape" then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
draw()
|
||||
|
||||
if love.timer then
|
||||
love.timer.sleep(0.1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -829,21 +831,23 @@ function love.releaseerrhand(msg)
|
||||
love.graphics.present()
|
||||
end
|
||||
|
||||
draw()
|
||||
|
||||
local e, a, b, c
|
||||
while true do
|
||||
e, a, b, c = love.event.wait()
|
||||
love.event.pump()
|
||||
|
||||
if e == "quit" then
|
||||
return
|
||||
end
|
||||
if e == "keypressed" and a == "escape" then
|
||||
return
|
||||
for e, a, b, c in love.event.poll() do
|
||||
if e == "quit" then
|
||||
return
|
||||
end
|
||||
if e == "keypressed" and a == "escape" then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
draw()
|
||||
|
||||
if love.timer then
|
||||
love.timer.sleep(0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user