From cd63709ed817c4c363a9d6480e7a959bba2fde80 Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Sat, 13 Oct 2018 17:18:59 +0100 Subject: [PATCH] Emscripten: Load eglQueryString and eglGetError This prevents an assertion on context creation failure (calling a null function pointer). --- src/video/emscripten/SDL_emscriptenopengles.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/emscripten/SDL_emscriptenopengles.c b/src/video/emscripten/SDL_emscriptenopengles.c index a6609edc0817e..7d8c0057535c5 100644 --- a/src/video/emscripten/SDL_emscriptenopengles.c +++ b/src/video/emscripten/SDL_emscriptenopengles.c @@ -60,7 +60,9 @@ Emscripten_GLES_LoadLibrary(_THIS, const char *path) { LOAD_FUNC(eglWaitNative); LOAD_FUNC(eglWaitGL); LOAD_FUNC(eglBindAPI); - + LOAD_FUNC(eglQueryString); + LOAD_FUNC(eglGetError); + _this->egl_data->egl_display = _this->egl_data->eglGetDisplay(EGL_DEFAULT_DISPLAY); if (!_this->egl_data->egl_display) { return SDL_SetError("Could not get EGL display");