From f0f20730067ef79dd87fd24b5a670ef3f38c0b88 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 10 Apr 2021 14:53:26 +0200 Subject: 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. --- src/video/win32_v.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video/win32_v.h') diff --git a/src/video/win32_v.h b/src/video/win32_v.h index f6ca291f1..8c63aeedf 100644 --- a/src/video/win32_v.h +++ b/src/video/win32_v.h @@ -138,12 +138,13 @@ public: bool HasAnimBuffer() override { return true; } uint8 *GetAnimBuffer() override { return this->anim_buffer; } + void ToggleVsync(bool vsync) override; + const char *GetName() const override { return "win32-opengl"; } protected: HDC dc; ///< Window device context. HGLRC gl_rc; ///< OpenGL context. - bool vsync; ///< Enable VSync? uint8 *anim_buffer; ///< Animation buffer from OpenGL back-end. uint8 GetFullscreenBpp() override { return 32; } // OpenGL is always 32 bpp. -- cgit v1.2.3-54-g00ecf