Ensure that the right window is current in SDL_GL_SwapWindow.
This commit is contained in:
parent
9fb9406bbc
commit
5d1bee0f17
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue