src/video/SDL_surface.c
changeset 5375 16877f74123c
parent 5296 48067bfc300c
child 5438 b705640cb34a
     1.1 --- a/src/video/SDL_surface.c	Mon Feb 21 15:25:49 2011 -0800
     1.2 +++ b/src/video/SDL_surface.c	Mon Feb 21 16:45:23 2011 -0800
     1.3 @@ -814,6 +814,21 @@
     1.4      return (convert);
     1.5  }
     1.6  
     1.7 +SDL_Surface *
     1.8 +SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format,
     1.9 +                         Uint32 flags)
    1.10 +{
    1.11 +    SDL_PixelFormat *fmt;
    1.12 +    SDL_Surface *convert;
    1.13 +
    1.14 +    fmt = SDL_AllocFormat(pixel_format);
    1.15 +    if (fmt) {
    1.16 +        convert = SDL_ConvertSurface(surface, fmt, flags);
    1.17 +        SDL_FreeFormat(fmt);
    1.18 +    }
    1.19 +    return convert;
    1.20 +}
    1.21 +
    1.22  /*
    1.23   * Create a surface on the stack for quick blit operations
    1.24   */