mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-06 03:50:35 +00:00
Added IsSupported property, which checks for the existence of EGL libraries.
This commit is contained in:
parent
a905b3ce24
commit
d9fc224f72
|
@ -403,6 +403,17 @@ namespace OpenTK.Platform.Egl
|
||||||
[return: MarshalAsAttribute(UnmanagedType.I1)]
|
[return: MarshalAsAttribute(UnmanagedType.I1)]
|
||||||
public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
|
public static extern bool CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
|
||||||
|
|
||||||
|
// Returns true if Egl drivers exist on the system.
|
||||||
|
public static bool IsSupported
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try { GetCurrentContext(); }
|
||||||
|
catch (Exception) { return false; }
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#pragma warning restore 0169
|
#pragma warning restore 0169
|
||||||
}
|
}
|
Loading…
Reference in a new issue