Make non-global variables static. Only set framerate limit when vsync is disabled