2
0
Эх сурвалжийг харах

Move most of the sleep in the default error handler into love.event.pump.

This lets event processing run faster when needed, which avoids some stutters when the window is dragged or resized on Windows.
Sasha Szpakowski 2 сар өмнө
parent
commit
4e49a8db76

+ 2 - 2
src/modules/love/callbacks.lua

@@ -306,7 +306,7 @@ function love.errorhandler(msg)
 	end
 	end
 
 
 	return function()
 	return function()
-		love.event.pump()
+		love.event.pump(0.1)
 
 
 		for e, a, b, c in love.event.poll() do
 		for e, a, b, c in love.event.poll() do
 			if e == "quit" then
 			if e == "quit" then
@@ -334,7 +334,7 @@ function love.errorhandler(msg)
 		draw()
 		draw()
 
 
 		if love.timer then
 		if love.timer then
-			love.timer.sleep(0.1)
+			love.timer.sleep(0.001)
 		end
 		end
 	end
 	end