src/video/x11/SDL_x11modes.c
changeset 7037 3fedf1f25b94
parent 6941 9bb475091e51
child 7191 75360622e65f
     1.1 --- a/src/video/x11/SDL_x11modes.c	Fri Mar 29 21:29:57 2013 -0400
     1.2 +++ b/src/video/x11/SDL_x11modes.c	Sun Mar 31 12:48:50 2013 -0400
     1.3 @@ -656,8 +656,7 @@
     1.4  #endif
     1.5  
     1.6      if (_this->num_displays == 0) {
     1.7 -        SDL_SetError("No available displays");
     1.8 -        return -1;
     1.9 +        return SDL_SetError("No available displays");
    1.10      }
    1.11      return 0;
    1.12  }
    1.13 @@ -798,23 +797,20 @@
    1.14  
    1.15          res = XRRGetScreenResources (display, RootWindow(display, data->screen));
    1.16          if (!res) {
    1.17 -            SDL_SetError("Couldn't get XRandR screen resources");
    1.18 -            return -1;
    1.19 +            return SDL_SetError("Couldn't get XRandR screen resources");
    1.20          }
    1.21  
    1.22          output_info = XRRGetOutputInfo(display, res, data->xrandr_output);
    1.23          if (!output_info || output_info->connection == RR_Disconnected) {
    1.24 -            SDL_SetError("Couldn't get XRandR output info");
    1.25              XRRFreeScreenResources(res);
    1.26 -            return -1;
    1.27 +            return SDL_SetError("Couldn't get XRandR output info");
    1.28          }
    1.29  
    1.30          crtc = XRRGetCrtcInfo(display, res, output_info->crtc);
    1.31          if (!crtc) {
    1.32 -            SDL_SetError("Couldn't get XRandR crtc info");
    1.33              XRRFreeOutputInfo(output_info);
    1.34              XRRFreeScreenResources(res);
    1.35 -            return -1;
    1.36 +            return SDL_SetError("Couldn't get XRandR crtc info");
    1.37          }
    1.38  
    1.39          status = XRRSetCrtcConfig (display, res, output_info->crtc, CurrentTime,
    1.40 @@ -826,8 +822,7 @@
    1.41          XRRFreeScreenResources(res);
    1.42  
    1.43          if (status != Success) {
    1.44 -            SDL_SetError("XRRSetCrtcConfig failed");
    1.45 -            return -1;
    1.46 +            return SDL_SetError("XRRSetCrtcConfig failed");
    1.47          }
    1.48      }
    1.49  #endif /* SDL_VIDEO_DRIVER_X11_XRANDR */