Added a few changes to take into account system settings.
This includes making sure that the render takes exactly as
many vblanks as there are frames. This is because most hardware
that is released since 2001 is capable of rendering more than
100k triangles a second, so it would be reasonable to expect
that even in software mode, this should hold true.