Only put surfaces in video memory if there are accelerated blits

This commit is contained in:
Sam Lantinga
2002-03-10 03:38:32 +00:00
parent e8bc164967
commit d7b7de529d

View File

@@ -844,7 +844,10 @@ SDL_Surface * SDL_DisplayFormat (SDL_Surface *surface)
return(NULL);
}
/* Set the flags appropriate for copying to display surface */
flags = (SDL_PublicSurface->flags&SDL_HWSURFACE);
if ((SDL_PublicSurface->flags&SDL_HWSURFACE == SDL_HWSURFACE) && current_video->info.blit_hw)
flags = SDL_HWSURFACE;
else
flags = SDL_SWSURFACE;
#ifdef AUTORLE_DISPLAYFORMAT
flags |= (surface->flags & (SDL_SRCCOLORKEY|SDL_SRCALPHA));
flags |= SDL_RLEACCELOK;