Fixed loading textures when the window starts hidden.
The viewport automatically resets to the window size when you programmatically resize the window.
This commit is contained in:
parent
f1b459aaf7
commit
aaf23fe8af
7 changed files with 76 additions and 30 deletions
|
@ -370,7 +370,9 @@ GLES_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
|
|||
{
|
||||
GLES_RenderData *data = (GLES_RenderData *) renderer->driverdata;
|
||||
|
||||
if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED) {
|
||||
if (event->event == SDL_WINDOWEVENT_SIZE_CHANGED ||
|
||||
event->event == SDL_WINDOWEVENT_SHOWN ||
|
||||
event->event == SDL_WINDOWEVENT_HIDDEN) {
|
||||
/* Rebind the context to the window area and update matrices */
|
||||
SDL_CurrentContext = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue