diff --git a/src/win32/win32gliface.cpp b/src/win32/win32gliface.cpp index bd4600bb0..cb6da5ff9 100644 --- a/src/win32/win32gliface.cpp +++ b/src/win32/win32gliface.cpp @@ -1159,10 +1159,15 @@ bool SystemFrameBuffer::IsFullscreen() // // //========================================================================== +EXTERN_CVAR(Bool, vid_vsync); +CUSTOM_CVAR(Bool, gl_control_tear, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) +{ + vid_vsync.Callback(); +} void SystemFrameBuffer::SetVSync (bool vsync) { - if (myWglSwapIntervalExtProc != NULL) myWglSwapIntervalExtProc(vsync ? SwapInterval : 0); + if (myWglSwapIntervalExtProc != NULL) myWglSwapIntervalExtProc(vsync ? (gl_control_tear? SwapInterval : 1) : 0); } void SystemFrameBuffer::SwapBuffers()