Browse Source

Fixed ABI, don't change the return type of SDL_GL_SwapWindow()

Sam Lantinga 8 years ago
parent
commit
8414c3d4ae
3 changed files with 9 additions and 7 deletions
  1. 1 1
      include/SDL_video.h
  2. 1 1
      src/dynapi/SDL_dynapi_procs.h
  3. 7 5
      src/video/SDL_video.c

+ 1 - 1
include/SDL_video.h

@@ -1195,7 +1195,7 @@ extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
  * \brief Swap the OpenGL buffers for a window, if double-buffering is
  * \brief Swap the OpenGL buffers for a window, if double-buffering is
  *        supported.
  *        supported.
  */
  */
-extern DECLSPEC int SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
+extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
 
 
 /**
 /**
  *  \brief Delete an OpenGL context.
  *  \brief Delete an OpenGL context.

+ 1 - 1
src/dynapi/SDL_dynapi_procs.h

@@ -595,7 +595,7 @@ SDL_DYNAPI_PROC(SDL_GLContext,SDL_GL_GetCurrentContext,(void),(),return)
 SDL_DYNAPI_PROC(void,SDL_GL_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
 SDL_DYNAPI_PROC(void,SDL_GL_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
 SDL_DYNAPI_PROC(int,SDL_GL_SetSwapInterval,(int a),(a),return)
 SDL_DYNAPI_PROC(int,SDL_GL_SetSwapInterval,(int a),(a),return)
 SDL_DYNAPI_PROC(int,SDL_GL_GetSwapInterval,(void),(),return)
 SDL_DYNAPI_PROC(int,SDL_GL_GetSwapInterval,(void),(),return)
-SDL_DYNAPI_PROC(int,SDL_GL_SwapWindow,(SDL_Window *a),(a),return)
+SDL_DYNAPI_PROC(void,SDL_GL_SwapWindow,(SDL_Window *a),(a),return)
 SDL_DYNAPI_PROC(void,SDL_GL_DeleteContext,(SDL_GLContext a),(a),)
 SDL_DYNAPI_PROC(void,SDL_GL_DeleteContext,(SDL_GLContext a),(a),)
 SDL_DYNAPI_PROC(int,SDL_vsscanf,(const char *a, const char *b, va_list c),(a,b,c),return)
 SDL_DYNAPI_PROC(int,SDL_vsscanf,(const char *a, const char *b, va_list c),(a,b,c),return)
 SDL_DYNAPI_PROC(int,SDL_GameControllerAddMappingsFromRW,(SDL_RWops *a, int b),(a,b),return)
 SDL_DYNAPI_PROC(int,SDL_GameControllerAddMappingsFromRW,(SDL_RWops *a, int b),(a,b),return)

+ 7 - 5
src/video/SDL_video.c

@@ -3390,20 +3390,22 @@ SDL_GL_GetSwapInterval(void)
     }
     }
 }
 }
 
 
-int
+void
 SDL_GL_SwapWindow(SDL_Window * window)
 SDL_GL_SwapWindow(SDL_Window * window)
 {
 {
-    CHECK_WINDOW_MAGIC(window,-1);
+    CHECK_WINDOW_MAGIC(window,);
 
 
     if (!(window->flags & SDL_WINDOW_OPENGL)) {
     if (!(window->flags & SDL_WINDOW_OPENGL)) {
-        return SDL_SetError("The specified window isn't an OpenGL window");
+        SDL_SetError("The specified window isn't an OpenGL window");
+        return;
     }
     }
 
 
     if (SDL_GL_GetCurrentWindow() != window) {
     if (SDL_GL_GetCurrentWindow() != window) {
-        return SDL_SetError("The specified window has not been made current");
+        SDL_SetError("The specified window has not been made current");
+        return;
     }
     }
 
 
-    return _this->GL_SwapWindow(_this, window);
+    _this->GL_SwapWindow(_this, window);
 }
 }
 
 
 void
 void