parent
fadf41fc6e
commit
23b7bdef87
|
@ -566,7 +566,7 @@ SDL_EGL_InitializeOffscreen(_THIS, int device)
|
|||
EGLint num_egl_devices = 0;
|
||||
const char *egl_device_hint;
|
||||
|
||||
if (_this->gl_config.driver_loaded != 1) {
|
||||
if (_this->gl_config.driver_loaded <= 0) {
|
||||
return SDL_SetError("SDL_EGL_LoadLibraryOnly() has not been called or has failed.");
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,13 @@ OFFSCREEN_GL_LoadLibrary(_THIS, const char* path)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* driver_loaded gets incremented by SDL_GL_LoadLibrary when we return,
|
||||
but SDL_EGL_InitializeOffscreen checks that we're loaded before then,
|
||||
so temporarily bump it since we know that LoadLibraryOnly succeeded. */
|
||||
|
||||
_this->gl_config.driver_loaded++;
|
||||
ret = SDL_EGL_InitializeOffscreen(_this, 0);
|
||||
_this->gl_config.driver_loaded--;
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue