src/render/software/SDL_render_sw.c
changeset 7037 3fedf1f25b94
parent 6885 700f1b25f77f
child 7141 e276777b4247
     1.1 --- a/src/render/software/SDL_render_sw.c	Fri Mar 29 21:29:57 2013 -0400
     1.2 +++ b/src/render/software/SDL_render_sw.c	Sun Mar 31 12:48:50 2013 -0400
     1.3 @@ -200,8 +200,7 @@
     1.4  
     1.5      if (!SDL_PixelFormatEnumToMasks
     1.6          (texture->format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) {
     1.7 -        SDL_SetError("Unknown texture format");
     1.8 -        return -1;
     1.9 +        return SDL_SetError("Unknown texture format");
    1.10      }
    1.11  
    1.12      texture->driverdata =
    1.13 @@ -357,8 +356,7 @@
    1.14  
    1.15      final_points = SDL_stack_alloc(SDL_Point, count);
    1.16      if (!final_points) {
    1.17 -        SDL_OutOfMemory();
    1.18 -        return -1;
    1.19 +        return SDL_OutOfMemory();
    1.20      }
    1.21      if (renderer->viewport.x || renderer->viewport.y) {
    1.22          int x = renderer->viewport.x;
    1.23 @@ -407,8 +405,7 @@
    1.24  
    1.25      final_points = SDL_stack_alloc(SDL_Point, count);
    1.26      if (!final_points) {
    1.27 -        SDL_OutOfMemory();
    1.28 -        return -1;
    1.29 +        return SDL_OutOfMemory();
    1.30      }
    1.31      if (renderer->viewport.x || renderer->viewport.y) {
    1.32          int x = renderer->viewport.x;
    1.33 @@ -456,8 +453,7 @@
    1.34  
    1.35      final_rects = SDL_stack_alloc(SDL_Rect, count);
    1.36      if (!final_rects) {
    1.37 -        SDL_OutOfMemory();
    1.38 -        return -1;
    1.39 +        return SDL_OutOfMemory();
    1.40      }
    1.41      if (renderer->viewport.x || renderer->viewport.y) {
    1.42          int x = renderer->viewport.x;
    1.43 @@ -647,8 +643,7 @@
    1.44  
    1.45      if (rect->x < 0 || rect->x+rect->w > surface->w ||
    1.46          rect->y < 0 || rect->y+rect->h > surface->h) {
    1.47 -        SDL_SetError("Tried to read outside of surface bounds");
    1.48 -        return -1;
    1.49 +        return SDL_SetError("Tried to read outside of surface bounds");
    1.50      }
    1.51  
    1.52      src_format = surface->format->format;