From f7f11f555916c7e68e4dce2c29d5d5b7ed557131 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 14 Jan 2002 19:20:39 +0000 Subject: [PATCH] *** empty log message *** --- src/video/SDL_surface.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 414be1d3c..a86c2abec 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -711,6 +711,14 @@ SDL_Surface * SDL_ConvertSurface (SDL_Surface *surface, } } + /* Only create hw surfaces with alpha channel if hw alpha blits + are supported */ + if(format->Amask != 0 && (flags & SDL_HWSURFACE)) { + const SDL_VideoInfo *vi = SDL_GetVideoInfo(); + if(!vi || !vi->blit_hw_A) + flags &= ~SDL_HWSURFACE; + } + /* Create a new surface with the desired format */ convert = SDL_CreateRGBSurface(flags, surface->w, surface->h, format->BitsPerPixel,