mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 15:55:29 +00:00
Added check to disable swap control, if the relevant extension is not supported.
This commit is contained in:
parent
b41ad63491
commit
31672f0303
|
@ -225,9 +225,7 @@ namespace OpenTK.Platform.Windows
|
||||||
GL.LoadAll();
|
GL.LoadAll();
|
||||||
Glu.LoadAll();
|
Glu.LoadAll();
|
||||||
|
|
||||||
vsync_supported =
|
vsync_supported = Wgl.Arb.SupportsExtension(this.deviceContext, "WGL_EXT_swap_control") &&
|
||||||
(Wgl.ARB.SupportsExtension(this.deviceContext, "WGL_EXT_swap_control") ||
|
|
||||||
Wgl.EXT.SupportsExtension(this.deviceContext, "WGL_EXT_swap_control")) &&
|
|
||||||
Wgl.Load("wglGetSwapIntervalEXT") && Wgl.Load("wglSwapIntervalEXT");
|
Wgl.Load("wglGetSwapIntervalEXT") && Wgl.Load("wglSwapIntervalEXT");
|
||||||
|
|
||||||
if (source != null)
|
if (source != null)
|
||||||
|
@ -324,12 +322,12 @@ namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
//return vsync != 0;
|
return vsync_supported && Wgl.Ext.GetSwapInterval() != 0;
|
||||||
return Wgl.EXT.GetSwapInterval() != 0;
|
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
Wgl.EXT.SwapInterval(value ? 1 : 0);
|
if (vsync_supported)
|
||||||
|
Wgl.Ext.SwapInterval(value ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue