mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-05-09 19:22:16 +00:00
Throw extension if context creation fails
This aligns behavior with that of the other platforms.
This commit is contained in:
parent
80845315db
commit
913c4f16e6
|
@ -68,7 +68,9 @@ namespace OpenTK.Platform.SDL2
|
|||
}
|
||||
if (SdlContext == ContextHandle.Zero)
|
||||
{
|
||||
Debug.Print("SDL2 failed to create OpenGL context: {0}", SDL.SDL_GetError());
|
||||
var error = SDL.SDL_GetError();
|
||||
Debug.Print("SDL2 failed to create OpenGL context: {0}", error);
|
||||
throw new GraphicsContextException(error);
|
||||
}
|
||||
Handle = GraphicsContext.GetCurrentContext();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue