[GLControl] Use IGraphicsContext.SwapInterval to get/set vsync

This patch fixes warnings related to the deprecated
IGraphicsContext.VSync property.
This commit is contained in:
thefiddler 2014-01-26 10:39:39 +01:00
parent 24be068742
commit c9a86a63ab

View file

@ -394,10 +394,13 @@ namespace OpenTK
get
{
if (!IsHandleCreated)
return false;
{
return initial_vsync_value.HasValue ?
initial_vsync_value.Value : true;
}
ValidateState();
return Context.VSync;
return Context.SwapInterval != 0;
}
set
{
@ -412,7 +415,7 @@ namespace OpenTK
}
ValidateState();
Context.VSync = value;
Context.SwapInterval = value ? 1 : 0;
}
}