Wayland: changed a few "SetError(); return -1;" to "return SetError()".
authorRyan C. Gordon <icculus@icculus.org>
Tue, 07 Apr 2015 22:49:56 -0400
changeset 94693f8d36ffd19d
parent 9468 d001cff818bb
child 9470 1c41db87ce20
Wayland: changed a few "SetError(); return -1;" to "return SetError()".
src/video/wayland/SDL_waylandmouse.c
src/video/wayland/SDL_waylandvideo.c
src/video/wayland/SDL_waylandwindow.c
     1.1 --- a/src/video/wayland/SDL_waylandmouse.c	Sat Mar 28 19:43:46 2015 +0100
     1.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Tue Apr 07 22:49:56 2015 -0400
     1.3 @@ -356,8 +356,7 @@
     1.4  static int
     1.5  Wayland_SetRelativeMouseMode(SDL_bool enabled)
     1.6  {
     1.7 -    SDL_Unsupported();
     1.8 -    return -1;
     1.9 +    return SDL_Unsupported();
    1.10  }
    1.11  
    1.12  void
     2.1 --- a/src/video/wayland/SDL_waylandvideo.c	Sat Mar 28 19:43:46 2015 +0100
     2.2 +++ b/src/video/wayland/SDL_waylandvideo.c	Tue Apr 07 22:49:56 2015 -0400
     2.3 @@ -324,8 +324,7 @@
     2.4  static int
     2.5  Wayland_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
     2.6  {
     2.7 -    SDL_SetError("SetDisplayMode not (yet?) supported on Wayland.");
     2.8 -    return -1;
     2.9 +    return SDL_Unsupported();
    2.10  }
    2.11  
    2.12  void
     3.1 --- a/src/video/wayland/SDL_waylandwindow.c	Sat Mar 28 19:43:46 2015 +0100
     3.2 +++ b/src/video/wayland/SDL_waylandwindow.c	Tue Apr 07 22:49:56 2015 -0400
     3.3 @@ -186,8 +186,7 @@
     3.4      data->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) data->egl_window);
     3.5      
     3.6      if (data->egl_surface == EGL_NO_SURFACE) {
     3.7 -        SDL_SetError("failed to create a window surface");
     3.8 -        return -1;
     3.9 +        return SDL_SetError("failed to create a window surface");;
    3.10      }
    3.11  
    3.12      if (data->shell_surface) {