Added vsync option, must experiment on windows.