# HG changeset patch # User Sam Lantinga # Date 1011036039 0 # Node ID c9cd3b564e4bde5247b96ac1d46657148b366ff1 # Parent 63e391bd7085d4a9846776204b29d6f7703b6aed *** empty log message *** diff -r 63e391bd7085 -r c9cd3b564e4b src/video/SDL_surface.c --- a/src/video/SDL_surface.c Thu Jan 10 02:00:29 2002 +0000 +++ b/src/video/SDL_surface.c Mon Jan 14 19:20:39 2002 +0000 @@ -711,6 +711,14 @@ } } + /* 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,