src/render/software/SDL_drawpoint.c
changeset 7037 3fedf1f25b94
parent 6885 700f1b25f77f
child 8093 b43765095a6f
     1.1 --- a/src/render/software/SDL_drawpoint.c	Fri Mar 29 21:29:57 2013 -0400
     1.2 +++ b/src/render/software/SDL_drawpoint.c	Sun Mar 31 12:48:50 2013 -0400
     1.3 @@ -30,14 +30,12 @@
     1.4  SDL_DrawPoint(SDL_Surface * dst, int x, int y, Uint32 color)
     1.5  {
     1.6      if (!dst) {
     1.7 -        SDL_SetError("Passed NULL destination surface");
     1.8 -        return -1;
     1.9 +        return SDL_SetError("Passed NULL destination surface");
    1.10      }
    1.11  
    1.12      /* This function doesn't work on surfaces < 8 bpp */
    1.13      if (dst->format->BitsPerPixel < 8) {
    1.14 -        SDL_SetError("SDL_DrawPoint(): Unsupported surface format");
    1.15 -        return -1;
    1.16 +        return SDL_SetError("SDL_DrawPoint(): Unsupported surface format");
    1.17      }
    1.18  
    1.19      /* Perform clipping */
    1.20 @@ -55,8 +53,7 @@
    1.21          DRAW_FASTSETPIXELXY2(x, y);
    1.22          break;
    1.23      case 3:
    1.24 -        SDL_Unsupported();
    1.25 -        return -1;
    1.26 +        return SDL_Unsupported();
    1.27      case 4:
    1.28          DRAW_FASTSETPIXELXY4(x, y);
    1.29          break;
    1.30 @@ -74,14 +71,12 @@
    1.31      int x, y;
    1.32  
    1.33      if (!dst) {
    1.34 -        SDL_SetError("Passed NULL destination surface");
    1.35 -        return -1;
    1.36 +        return SDL_SetError("Passed NULL destination surface");
    1.37      }
    1.38  
    1.39      /* This function doesn't work on surfaces < 8 bpp */
    1.40      if (dst->format->BitsPerPixel < 8) {
    1.41 -        SDL_SetError("SDL_DrawPoints(): Unsupported surface format");
    1.42 -        return -1;
    1.43 +        return SDL_SetError("SDL_DrawPoints(): Unsupported surface format");
    1.44      }
    1.45  
    1.46      minx = dst->clip_rect.x;
    1.47 @@ -105,8 +100,7 @@
    1.48              DRAW_FASTSETPIXELXY2(x, y);
    1.49              break;
    1.50          case 3:
    1.51 -            SDL_Unsupported();
    1.52 -            return -1;
    1.53 +            return SDL_Unsupported();
    1.54          case 4:
    1.55              DRAW_FASTSETPIXELXY4(x, y);
    1.56              break;