Feature: allow a toggle to enable/disable vsync
Vsync should be off by default, as for most players it will be better to play without vsync. Exception exist, mainly people who play in fullscreen mode.
This commit is contained in:
committed by
Patric Stout
parent
56f982fa7f
commit
f0f2073006
@@ -28,6 +28,7 @@ extern std::vector<Dimension> _resolutions;
|
||||
extern Dimension _cur_resolution;
|
||||
extern bool _rightclick_emulate;
|
||||
extern bool _video_hw_accel;
|
||||
extern bool _video_vsync;
|
||||
|
||||
/** The base of all video drivers. */
|
||||
class VideoDriver : public Driver {
|
||||
@@ -66,6 +67,12 @@ public:
|
||||
*/
|
||||
virtual bool ToggleFullscreen(bool fullscreen) = 0;
|
||||
|
||||
/**
|
||||
* Change the vsync setting.
|
||||
* @param vsync The new setting.
|
||||
*/
|
||||
virtual void ToggleVsync(bool vsync) {}
|
||||
|
||||
/**
|
||||
* Callback invoked after the blitter was changed.
|
||||
* @return True if no error.
|
||||
|
||||
Reference in New Issue
Block a user