src/SDL_compat.c
changeset 2807 365fe1a2aad5
parent 2803 8fe261aae1bb
child 2829 16fe3b867887
--- a/src/SDL_compat.c	Sat Nov 29 11:24:18 2008 +0000
+++ b/src/SDL_compat.c	Sat Nov 29 11:26:01 2008 +0000
@@ -614,17 +614,16 @@
 SDL_Surface *
 SDL_DisplayFormat(SDL_Surface * surface)
 {
-    SDL_Surface *converted;
+    SDL_PixelFormat *format;
 
     if (!SDL_PublicSurface) {
         SDL_SetError("No video mode has been set");
         return NULL;
     }
+    format = SDL_PublicSurface->format;
 
     /* Set the flags appropriate for copying to display surface */
-    converted = SDL_ConvertSurface(surface, SDL_PublicSurface->format, 0);
-    SDL_SetSurfaceRLE(converted, 1);
-    return converted;
+    return SDL_ConvertSurface(surface, format, SDL_RLEACCEL);
 }
 
 SDL_Surface *
@@ -673,8 +672,7 @@
         break;
     }
     format = SDL_AllocFormat(32, rmask, gmask, bmask, amask);
-    converted = SDL_ConvertSurface(surface, format, 0);
-    SDL_SetSurfaceRLE(converted, 1);
+    converted = SDL_ConvertSurface(surface, format, SDL_RLEACCEL);
     SDL_FreeFormat(format);
     return converted;
 }