Ensure that the right window is current in SDL_GL_SwapWindow.

This commit is contained in:
Jørgen P. Tjernø 2013-08-07 16:29:28 -07:00
parent 9fb9406bbc
commit 5d1bee0f17

View file

@ -2854,6 +2854,12 @@ SDL_GL_SwapWindow(SDL_Window * window)
SDL_SetError("The specified window isn't an OpenGL window");
return;
}
if (SDL_GL_GetCurrentWindow() != window) {
SDL_SetError("The specified window has not been made current");
return;
}
_this->GL_SwapWindow(_this, window);
}