aerys / minko

3D framework for web, desktop and mobile devices.
http://minko.io
Other
906 stars 210 forks source link

Changed sdl canvas to use the surplus time of the current frame instead of the previous one when waiting #185

Closed martonperei closed 9 years ago

martonperei commented 9 years ago

The current implementation uses the duration of the previous frame to calculate the surplus time to wait after the current frame. Is this intentional? Shouldn't the surplus time be calculated from the current frame's duration?

This causes weird behavior when vsync is off with _frameDuration alternating between 17ms and 0ms in each frame.

Also removed the manual _framerate cap so it reports the actual framerate (in case the desired framerate is not attainable). Is there any reason for manually setting it?

martonperei commented 9 years ago

The first issue have been fixed for a while. As for the second one, I can see why consistency could be useful. Closing the PR.