Fixed bug 3513 - SDL_GL_SwapWindow does not return error status

Return an error code from SDL_GL_SwapWindow(), like the other SDL APIs.
This commit is contained in:
Sam Lantinga 2016-12-09 01:47:43 -08:00
parent 3b18c796ed
commit 524bf3c282
38 changed files with 125 additions and 86 deletions

View file

@ -766,12 +766,15 @@ WIN_GL_GetSwapInterval(_THIS)
return retval;
}
void
int
WIN_GL_SwapWindow(_THIS, SDL_Window * window)
{
HDC hdc = ((SDL_WindowData *) window->driverdata)->hdc;
SwapBuffers(hdc);
if (!SwapBuffers(hdc)) {
return WIN_SetError("SwapBuffers()");
}
return 0;
}
void