1 parent
848fd1eab4
commit
615c935d11
8 files changed
+39
-13
No files matched your search
@@ -36,15 +36,16 @@
|
||||
static void android_egl_context_restore(SDL_Window *window)
|
||||
{
|
||||
if (window) {
|
||||
SDL_Event event;
|
||||
SDL_WindowData *data = window->internal;
|
||||
SDL_GL_MakeCurrent(window, NULL);
|
||||
if (!SDL_GL_MakeCurrent(window, (SDL_GLContext)data->egl_context)) {
|
||||
// The context is no longer valid, create a new one
|
||||
data->egl_context = (EGLContext)SDL_GL_CreateContext(window);
|
||||
SDL_GL_MakeCurrent(window, (SDL_GLContext)data->egl_context);
|
||||
SDL_Event event;
|
||||
SDL_zero(event);
|
||||
event.type = SDL_EVENT_RENDER_DEVICE_RESET;
|
||||
event.common.timestamp = 0;
|
||||
event.render.windowID = SDL_GetWindowID(SDL_GetRenderWindow(renderer));
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
data->backup_done = false;
|
||||
|
||||
Reference in new issue
Block a user