mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-16 19:18:55 +00:00
Fixed making the EGL context current when resuming on Android
Make sure that we don't have the context cached as current on the current thread. (cherry picked from commit8b6da3c701) (cherry picked from commit832afa81a1)
This commit is contained in:
parent
fcd0c9843e
commit
63d259edf0
1 changed files with 1 additions and 0 deletions
|
|
@ -74,6 +74,7 @@ static void android_egl_context_restore(SDL_Window *window)
|
|||
if (window) {
|
||||
SDL_Event event;
|
||||
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
||||
SDL_GL_MakeCurrent(window, NULL);
|
||||
if (SDL_GL_MakeCurrent(window, (SDL_GLContext)data->egl_context) < 0) {
|
||||
/* The context is no longer valid, create a new one */
|
||||
data->egl_context = (EGLContext)SDL_GL_CreateContext(window);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue