mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
WindowsWGL: use adaptive vsync when supported
This commit is contained in:
parent
82365ec389
commit
bfe3c36e73
|
@ -102,7 +102,15 @@ bool WindowsWGL::start()
|
||||||
|
|
||||||
if (strstr(wglextensions, "WGL_EXT_swap_control") != nullptr) {
|
if (strstr(wglextensions, "WGL_EXT_swap_control") != nullptr) {
|
||||||
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
|
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");
|
||||||
wglSwapIntervalEXT(config.video.verticalSync);
|
|
||||||
|
// use adaptive vsync when supported and
|
||||||
|
// when vsync is enabled
|
||||||
|
if (strstr(wglextensions, "WGL_EXT_swap_control_tear") != nullptr &&
|
||||||
|
config.video.verticalSync > 0) {
|
||||||
|
wglSwapIntervalEXT(-1);
|
||||||
|
} else {
|
||||||
|
wglSwapIntervalEXT(config.video.verticalSync);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user