mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 14:51:30 +11:00
Merge pull request #502 from tomaka/fix-wgl-ext-swap-control
Fix the discovery of the WGL_EXT_swap_control extension
This commit is contained in:
commit
4349de5541
|
@ -132,9 +132,7 @@ impl Context {
|
||||||
|
|
||||||
// handling vsync
|
// handling vsync
|
||||||
if builder.vsync {
|
if builder.vsync {
|
||||||
// contrary to most extensions, it is permitted to discover the presence of
|
if extensions.split(' ').find(|&i| i == "WGL_EXT_swap_control").is_some() {
|
||||||
// `WGL_EXT_swap_control` by seeing if the function pointer is available
|
|
||||||
if extra_functions.SwapIntervalEXT.is_loaded() {
|
|
||||||
let _guard = try!(CurrentContextGuard::make_current(hdc, context.0));
|
let _guard = try!(CurrentContextGuard::make_current(hdc, context.0));
|
||||||
|
|
||||||
if extra_functions.SwapIntervalEXT(1) == 0 {
|
if extra_functions.SwapIntervalEXT(1) == 0 {
|
||||||
|
|
Loading…
Reference in a new issue