Fixed a bunch of SwapWindow calls that needed their return value updated
parent
7a39681ea5
commit
97d05b0da8
|
@ -39,7 +39,7 @@
|
|||
SDL_EGL_CreateContext_impl(Android)
|
||||
SDL_EGL_MakeCurrent_impl(Android)
|
||||
|
||||
void
|
||||
int
|
||||
Android_GLES_SwapWindow(_THIS, SDL_Window * window)
|
||||
{
|
||||
/* The following two calls existed in the original Java code
|
||||
|
@ -49,7 +49,7 @@ Android_GLES_SwapWindow(_THIS, SDL_Window * window)
|
|||
|
||||
/*_this->egl_data->eglWaitNative(EGL_CORE_NATIVE_ENGINE);
|
||||
_this->egl_data->eglWaitGL();*/
|
||||
SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
|
||||
return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
SDL_GLContext Android_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
int Android_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
void Android_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
int Android_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
int Android_GLES_LoadLibrary(_THIS, const char *path);
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
extern int Emscripten_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern void Emscripten_GLES_DeleteContext(_THIS, SDL_GLContext context);
|
||||
extern SDL_GLContext Emscripten_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
extern void Emscripten_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int Emscripten_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int Emscripten_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
extern void Emscripten_GLES_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h);
|
||||
|
||||
|
|
|
@ -151,12 +151,15 @@ NACL_GLES_GetSwapInterval(_THIS)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
NACL_GLES_SwapWindow(_THIS, SDL_Window * window)
|
||||
{
|
||||
SDL_VideoData *driverdata = (SDL_VideoData *) _this->driverdata;
|
||||
struct PP_CompletionCallback callback = { NULL, 0, PP_COMPLETIONCALLBACK_FLAG_NONE };
|
||||
driverdata->ppb_graphics->SwapBuffers((PP_Resource) SDL_GL_GetCurrentContext(), callback );
|
||||
if (driverdata->ppb_graphics->SwapBuffers((PP_Resource) SDL_GL_GetCurrentContext(), callback ) != PP_OK) {
|
||||
return SDL_SetError("SwapBuffers failed");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -30,7 +30,7 @@ extern SDL_GLContext NACL_GLES_CreateContext(_THIS, SDL_Window * window);
|
|||
extern int NACL_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
extern int NACL_GLES_SetSwapInterval(_THIS, int interval);
|
||||
extern int NACL_GLES_GetSwapInterval(_THIS);
|
||||
extern void NACL_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int NACL_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern void NACL_GLES_DeleteContext(_THIS, SDL_GLContext context);
|
||||
|
||||
#endif /* _SDL_naclgl_h */
|
||||
|
|
|
@ -177,7 +177,9 @@ PSP_GL_GetSwapInterval(_THIS)
|
|||
int
|
||||
PSP_GL_SwapWindow(_THIS, SDL_Window * window)
|
||||
{
|
||||
eglSwapBuffers(_this->gl_data->display, _this->gl_data->surface);
|
||||
if (!eglSwapBuffers(_this->gl_data->display, _this->gl_data->surface)) {
|
||||
return SDL_SetError("!eglSwapBuffers() failed");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
extern int RPI_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern SDL_GLContext RPI_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
extern void RPI_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int RPI_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int RPI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
|
||||
#endif /* SDL_VIDEO_DRIVER_RPI && SDL_VIDEO_OPENGL_EGL */
|
||||
|
|
|
@ -90,7 +90,7 @@ SDL_GLContext RPI_GLES_CreateContext(_THIS, SDL_Window * window);
|
|||
int RPI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
int RPI_GLES_SetSwapInterval(_THIS, int interval);
|
||||
int RPI_GLES_GetSwapInterval(_THIS);
|
||||
void RPI_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
int RPI_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
void RPI_GLES_DeleteContext(_THIS, SDL_GLContext context);
|
||||
|
||||
#endif /* __SDL_RPIVIDEO_H__ */
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
extern int VIVANTE_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern SDL_GLContext VIVANTE_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
extern void VIVANTE_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int VIVANTE_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int VIVANTE_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
|
||||
#endif /* SDL_VIDEO_DRIVER_VIVANTE && SDL_VIDEO_OPENGL_EGL */
|
||||
|
|
|
@ -54,14 +54,16 @@ Wayland_GLES_CreateContext(_THIS, SDL_Window * window)
|
|||
return context;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
Wayland_GLES_SwapWindow(_THIS, SDL_Window *window)
|
||||
{
|
||||
SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
|
||||
if (SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface) < 0) {
|
||||
return -1;
|
||||
}
|
||||
WAYLAND_wl_display_flush( ((SDL_VideoData*)_this->driverdata)->display );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
Wayland_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ typedef struct SDL_PrivateGLESData
|
|||
|
||||
extern int Wayland_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern SDL_GLContext Wayland_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
extern void Wayland_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int Wayland_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int Wayland_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
extern void Wayland_GLES_DeleteContext(_THIS, SDL_GLContext context);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ extern int WIN_GLES_SetSwapInterval(_THIS, int interval);
|
|||
|
||||
extern int WIN_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern SDL_GLContext WIN_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
extern void WIN_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int WIN_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int WIN_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
extern void WIN_GLES_DeleteContext(_THIS, SDL_GLContext context);
|
||||
extern int WIN_GLES_SetupWindow(_THIS, SDL_Window * window);
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
extern int WINRT_GLES_LoadLibrary(_THIS, const char *path);
|
||||
extern void WINRT_GLES_UnloadLibrary(_THIS);
|
||||
extern SDL_GLContext WINRT_GLES_CreateContext(_THIS, SDL_Window * window);
|
||||
extern void WINRT_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int WINRT_GLES_SwapWindow(_THIS, SDL_Window * window);
|
||||
extern int WINRT_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue