Fixed SDL applications being killed immediately after being backgrounded, because they were trying to draw while minimized.

This commit is contained in:
Sam Lantinga 2011-11-07 23:07:00 -05:00
parent 352caf548a
commit c5b4e5f63e
4 changed files with 49 additions and 0 deletions

View file

@ -279,6 +279,11 @@ GLES_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
/* Rebind the context to the window area and update matrices */
SDL_CurrentContext = NULL;
}
if (event->event == SDL_WINDOWEVENT_MINIMIZED) {
/* According to Apple documentation, we need to finish drawing NOW! */
glFinish();
}
}
static __inline__ int