src/video/SDL_surface.c
changeset 2234 cf8c3b0117b3
parent 2222 926294b2bb4e
child 2235 55a8bebf9ba6
     1.1 --- a/src/video/SDL_surface.c	Sun Aug 12 16:53:58 2007 +0000
     1.2 +++ b/src/video/SDL_surface.c	Sun Aug 12 18:27:44 2007 +0000
     1.3 @@ -568,6 +568,7 @@
     1.4          dstrect->x * dst->format->BytesPerPixel;
     1.5      if (dst->format->palette || (color == 0)) {
     1.6          x = dstrect->w * dst->format->BytesPerPixel;
     1.7 +#ifndef __MACOSX__  /* memset() is optimized on Mac OS X */
     1.8          if (!color && !((uintptr_t) row & 3) && !(x & 3)
     1.9              && !(dst->pitch & 3)) {
    1.10              int n = x >> 2;
    1.11 @@ -575,7 +576,9 @@
    1.12                  SDL_memset4(row, 0, n);
    1.13                  row += dst->pitch;
    1.14              }
    1.15 -        } else {
    1.16 +        } else
    1.17 +#endif /* !__MACOSX__ */
    1.18 +        {
    1.19              for (y = dstrect->h; y; y--) {
    1.20                  SDL_memset(row, color, x);
    1.21                  row += dst->pitch;