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

@@ -246,7 +246,7 @@ DirectFB_GL_GetSwapInterval(_THIS)
return 0;
}
void
int
DirectFB_GL_SwapWindow(_THIS, SDL_Window * window)
{
SDL_DFB_WINDOWDATA(window);
@@ -273,9 +273,9 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window)
}
SDL_DFB_CHECKERR(windata->window_surface->Flip(windata->window_surface,NULL, DSFLIP_PIPELINE |DSFLIP_BLIT | DSFLIP_ONSYNC ));
return;
return 0;
error:
return;
return -1;
}
void

View File

@@ -50,7 +50,7 @@ extern int DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window,
SDL_GLContext context);
extern int DirectFB_GL_SetSwapInterval(_THIS, int interval);
extern int DirectFB_GL_GetSwapInterval(_THIS);
extern void DirectFB_GL_SwapWindow(_THIS, SDL_Window * window);
extern int DirectFB_GL_SwapWindow(_THIS, SDL_Window * window);
extern void DirectFB_GL_DeleteContext(_THIS, SDL_GLContext context);
extern void DirectFB_GL_FreeWindowContexts(_THIS, SDL_Window * window);