Fixed ABI, don't change the return type of SDL_GL_SwapWindow()
authorSam Lantinga <slouken@libsdl.org>
Sun, 11 Dec 2016 12:01:44 -0800
changeset 1070000fe449fbefe
parent 10699 5b918dee0872
child 10701 62f7dd0acd13
Fixed ABI, don't change the return type of SDL_GL_SwapWindow()
include/SDL_video.h
src/dynapi/SDL_dynapi_procs.h
src/video/SDL_video.c
     1.1 --- a/include/SDL_video.h	Sun Dec 11 12:01:01 2016 -0800
     1.2 +++ b/include/SDL_video.h	Sun Dec 11 12:01:44 2016 -0800
     1.3 @@ -1195,7 +1195,7 @@
     1.4   * \brief Swap the OpenGL buffers for a window, if double-buffering is
     1.5   *        supported.
     1.6   */
     1.7 -extern DECLSPEC int SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
     1.8 +extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
     1.9  
    1.10  /**
    1.11   *  \brief Delete an OpenGL context.
     2.1 --- a/src/dynapi/SDL_dynapi_procs.h	Sun Dec 11 12:01:01 2016 -0800
     2.2 +++ b/src/dynapi/SDL_dynapi_procs.h	Sun Dec 11 12:01:44 2016 -0800
     2.3 @@ -595,7 +595,7 @@
     2.4  SDL_DYNAPI_PROC(void,SDL_GL_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
     2.5  SDL_DYNAPI_PROC(int,SDL_GL_SetSwapInterval,(int a),(a),return)
     2.6  SDL_DYNAPI_PROC(int,SDL_GL_GetSwapInterval,(void),(),return)
     2.7 -SDL_DYNAPI_PROC(int,SDL_GL_SwapWindow,(SDL_Window *a),(a),return)
     2.8 +SDL_DYNAPI_PROC(void,SDL_GL_SwapWindow,(SDL_Window *a),(a),return)
     2.9  SDL_DYNAPI_PROC(void,SDL_GL_DeleteContext,(SDL_GLContext a),(a),)
    2.10  SDL_DYNAPI_PROC(int,SDL_vsscanf,(const char *a, const char *b, va_list c),(a,b,c),return)
    2.11  SDL_DYNAPI_PROC(int,SDL_GameControllerAddMappingsFromRW,(SDL_RWops *a, int b),(a,b),return)
     3.1 --- a/src/video/SDL_video.c	Sun Dec 11 12:01:01 2016 -0800
     3.2 +++ b/src/video/SDL_video.c	Sun Dec 11 12:01:44 2016 -0800
     3.3 @@ -3390,20 +3390,22 @@
     3.4      }
     3.5  }
     3.6  
     3.7 -int
     3.8 +void
     3.9  SDL_GL_SwapWindow(SDL_Window * window)
    3.10  {
    3.11 -    CHECK_WINDOW_MAGIC(window,-1);
    3.12 +    CHECK_WINDOW_MAGIC(window,);
    3.13  
    3.14      if (!(window->flags & SDL_WINDOW_OPENGL)) {
    3.15 -        return SDL_SetError("The specified window isn't an OpenGL window");
    3.16 +        SDL_SetError("The specified window isn't an OpenGL window");
    3.17 +        return;
    3.18      }
    3.19  
    3.20      if (SDL_GL_GetCurrentWindow() != window) {
    3.21 -        return SDL_SetError("The specified window has not been made current");
    3.22 -    }
    3.23 -
    3.24 -    return _this->GL_SwapWindow(_this, window);
    3.25 +        SDL_SetError("The specified window has not been made current");
    3.26 +        return;
    3.27 +    }
    3.28 +
    3.29 +    _this->GL_SwapWindow(_this, window);
    3.30  }
    3.31  
    3.32  void