mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-06 02:00:41 +00:00
Remove a lock on a read-only operation, in IsCurrent()
This commit is contained in:
parent
0c1082892d
commit
e335698c07
|
@ -346,10 +346,6 @@ namespace OpenTK.Platform.X11
|
||||||
currentWindow = w;
|
currentWindow = w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
throw new GraphicsContextException("Failed to make context current.");
|
throw new GraphicsContextException("Failed to make context current.");
|
||||||
|
@ -366,13 +362,10 @@ namespace OpenTK.Platform.X11
|
||||||
public override bool IsCurrent
|
public override bool IsCurrent
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
|
||||||
using (new XLock(Display))
|
|
||||||
{
|
{
|
||||||
return Glx.GetCurrentContext() == Handle.Handle;
|
return Glx.GetCurrentContext() == Handle.Handle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public override int SwapInterval
|
public override int SwapInterval
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue