소스 검색

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.
Sam Lantinga 1 년 전
부모
커밋
8b6da3c701
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/video/android/SDL_androidevents.c

+ 1 - 0
src/video/android/SDL_androidevents.c

@@ -45,6 +45,7 @@ static void android_egl_context_restore(SDL_Window *window)
     if (window) {
         SDL_Event event;
         SDL_WindowData *data = 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);