mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
egl: Handle error when binding EGL API in context creation
This commit is contained in:
committed by
Ryan C. Gordon
parent
55fa5e0336
commit
6b060435e3
@@ -1115,7 +1115,10 @@ SDL_GLContext SDL_EGL_CreateContext(SDL_VideoDevice *_this, EGLSurface egl_surfa
|
|||||||
} else {
|
} else {
|
||||||
_this->egl_data->apitype = EGL_OPENGL_API;
|
_this->egl_data->apitype = EGL_OPENGL_API;
|
||||||
}
|
}
|
||||||
_this->egl_data->eglBindAPI(_this->egl_data->apitype);
|
if (!_this->egl_data->eglBindAPI(_this->egl_data->apitype)) {
|
||||||
|
SDL_SetError("Could not bind EGL API");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
egl_context = _this->egl_data->eglCreateContext(_this->egl_data->egl_display,
|
egl_context = _this->egl_data->eglCreateContext(_this->egl_data->egl_display,
|
||||||
_this->egl_data->egl_config,
|
_this->egl_data->egl_config,
|
||||||
|
|||||||
Reference in New Issue
Block a user