Description
Currently, VSync is enabled/disable via a window flag, and can currently only be set via a flag in the project settings.
However, from what I've read, there should be no issue with adding a function to allow the application to change the VSync mode.
This would require making this call into its own function, then making that accessible on the Window object (either via a function or a property variable).
lime/project/src/backend/sdl/SDLWindow.cpp
Lines 222 to 230 in 99ca58d
Adding this feature would enable applications to provide a configuration option for users to enable or disable VSync.
Additionally, while we're at it, we should also add the option to use Adaptive VSync. This is done by passing -1
to the swap interval function, and returns an error if it is not supported (see the SDL documentation). In this case, the option should probably be an enumeration rather than a boolean value.