mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 18:45:36 +00:00
* EglWindowInfo.cs: Corrected error checking for
CreateWindowSurface. Fixes issue [#2248]: "EGL CreateWindowSurface function is incorrect".
This commit is contained in:
parent
a964d3a9de
commit
d22c7312d9
|
@ -73,9 +73,11 @@ namespace OpenTK.Platform.Egl
|
||||||
public void CreateWindowSurface(IntPtr config)
|
public void CreateWindowSurface(IntPtr config)
|
||||||
{
|
{
|
||||||
Surface = Egl.CreateWindowSurface(Display, config, Handle, null);
|
Surface = Egl.CreateWindowSurface(Display, config, Handle, null);
|
||||||
int error = Egl.GetError();
|
if (Surface==IntPtr.Zero)
|
||||||
if (error != Egl.SUCCESS)
|
{
|
||||||
throw new GraphicsContextException(String.Format("[Error] Failed to create EGL window surface, error {0}.", error));
|
throw new GraphicsContextException(String.Format(
|
||||||
|
"[Error] Failed to create EGL window surface, error {0}.", Egl.GetError()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public void CreatePixmapSurface(EGLConfig config)
|
//public void CreatePixmapSurface(EGLConfig config)
|
||||||
|
|
Loading…
Reference in a new issue