mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-10 19:15:33 +00:00
[GLControl] Use IGraphicsContext.SwapInterval to get/set vsync
This patch fixes warnings related to the deprecated IGraphicsContext.VSync property.
This commit is contained in:
parent
24be068742
commit
c9a86a63ab
|
@ -394,10 +394,13 @@ namespace OpenTK
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!IsHandleCreated)
|
if (!IsHandleCreated)
|
||||||
return false;
|
{
|
||||||
|
return initial_vsync_value.HasValue ?
|
||||||
|
initial_vsync_value.Value : true;
|
||||||
|
}
|
||||||
|
|
||||||
ValidateState();
|
ValidateState();
|
||||||
return Context.VSync;
|
return Context.SwapInterval != 0;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
@ -412,7 +415,7 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
|
|
||||||
ValidateState();
|
ValidateState();
|
||||||
Context.VSync = value;
|
Context.SwapInterval = value ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue