Fixed the error screen sometimes not properly appearing until the next input event due to double/triple-buffering

This commit is contained in:
Alex Szpakowski
2013-07-01 23:29:18 -03:00
parent 3b3c5c3711
commit 8084096937
2 changed files with 60 additions and 42 deletions
+22 -18
View File
@@ -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