mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-30 19:24:20 +00:00
SDL_GL_SwapWindow() returns an error code
This commit is contained in:
@@ -230,7 +230,7 @@ SDL_DYNAPI_PROC(int,SDL_GL_MakeCurrent,(SDL_Window *a, SDL_GLContext b),(a,b),re
|
||||
SDL_DYNAPI_PROC(void,SDL_GL_ResetAttributes,(void),(),)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_SetAttribute,(SDL_GLattr a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_SetSwapInterval,(int a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GL_SwapWindow,(SDL_Window *a),(a),)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_SwapWindow,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GL_UnbindTexture,(SDL_Texture *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GL_UnloadLibrary,(void),(),)
|
||||
SDL_DYNAPI_PROC(SDL_GUID,SDL_GUIDFromString,(const char *a),(a),return)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#if SDL_VIDEO_RENDER_OGL && !SDL_RENDER_DISABLED
|
||||
#include "../../video/SDL_sysvideo.h" /* For SDL_GL_SwapWindowWithResult and SDL_RecreateWindow */
|
||||
#include "../../video/SDL_sysvideo.h" /* For SDL_RecreateWindow */
|
||||
#include <SDL3/SDL_opengl.h>
|
||||
#include "../SDL_sysrender.h"
|
||||
#include "SDL_shaders_gl.h"
|
||||
@@ -1480,7 +1480,7 @@ static int GL_RenderPresent(SDL_Renderer *renderer)
|
||||
{
|
||||
GL_ActivateRenderer(renderer);
|
||||
|
||||
return SDL_GL_SwapWindowWithResult(renderer->window);
|
||||
return SDL_GL_SwapWindow(renderer->window);
|
||||
}
|
||||
|
||||
static void GL_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#if SDL_VIDEO_RENDER_OGL_ES2 && !SDL_RENDER_DISABLED
|
||||
|
||||
#include "../../video/SDL_sysvideo.h" /* For SDL_GL_SwapWindowWithResult and SDL_RecreateWindow */
|
||||
#include "../../video/SDL_sysvideo.h" /* For SDL_RecreateWindow */
|
||||
#include <SDL3/SDL_opengles2.h>
|
||||
#include "../SDL_sysrender.h"
|
||||
#include "../../video/SDL_blit.h"
|
||||
@@ -1956,7 +1956,7 @@ static int GLES2_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect,
|
||||
static int GLES2_RenderPresent(SDL_Renderer *renderer)
|
||||
{
|
||||
/* Tell the video driver to swap buffers */
|
||||
return SDL_GL_SwapWindowWithResult(renderer->window);
|
||||
return SDL_GL_SwapWindow(renderer->window);
|
||||
}
|
||||
|
||||
static int GLES2_SetVSync(SDL_Renderer *renderer, const int vsync)
|
||||
|
||||
@@ -515,6 +515,4 @@ extern void SDL_ToggleDragAndDropSupport(void);
|
||||
|
||||
extern int SDL_GetDisplayIndexForPoint(const SDL_Point *point);
|
||||
|
||||
extern int SDL_GL_SwapWindowWithResult(SDL_Window *window);
|
||||
|
||||
#endif /* SDL_sysvideo_h_ */
|
||||
|
||||
@@ -4066,7 +4066,7 @@ int SDL_GL_GetSwapInterval(void)
|
||||
}
|
||||
}
|
||||
|
||||
int SDL_GL_SwapWindowWithResult(SDL_Window *window)
|
||||
int SDL_GL_SwapWindow(SDL_Window *window)
|
||||
{
|
||||
CHECK_WINDOW_MAGIC(window, -1);
|
||||
|
||||
@@ -4081,11 +4081,6 @@ int SDL_GL_SwapWindowWithResult(SDL_Window *window)
|
||||
return _this->GL_SwapWindow(_this, window);
|
||||
}
|
||||
|
||||
void SDL_GL_SwapWindow(SDL_Window *window)
|
||||
{
|
||||
SDL_GL_SwapWindowWithResult(window);
|
||||
}
|
||||
|
||||
void SDL_GL_DeleteContext(SDL_GLContext context)
|
||||
{
|
||||
if (_this == NULL || !context) {
|
||||
|
||||
Reference in New Issue
Block a user