Mercurial > sdl-ios-xcode
comparison src/video/SDL_surface.c @ 264:c9cd3b564e4b
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 14 Jan 2002 19:20:39 +0000 |
parents | e8157fcb3114 |
children | eadc0746dfaf |
comparison
equal
deleted
inserted
replaced
263:63e391bd7085 | 264:c9cd3b564e4b |
---|---|
709 SDL_SetError("Empty destination palette"); | 709 SDL_SetError("Empty destination palette"); |
710 return(NULL); | 710 return(NULL); |
711 } | 711 } |
712 } | 712 } |
713 | 713 |
714 /* Only create hw surfaces with alpha channel if hw alpha blits | |
715 are supported */ | |
716 if(format->Amask != 0 && (flags & SDL_HWSURFACE)) { | |
717 const SDL_VideoInfo *vi = SDL_GetVideoInfo(); | |
718 if(!vi || !vi->blit_hw_A) | |
719 flags &= ~SDL_HWSURFACE; | |
720 } | |
721 | |
714 /* Create a new surface with the desired format */ | 722 /* Create a new surface with the desired format */ |
715 convert = SDL_CreateRGBSurface(flags, | 723 convert = SDL_CreateRGBSurface(flags, |
716 surface->w, surface->h, format->BitsPerPixel, | 724 surface->w, surface->h, format->BitsPerPixel, |
717 format->Rmask, format->Gmask, format->Bmask, format->Amask); | 725 format->Rmask, format->Gmask, format->Bmask, format->Amask); |
718 if ( convert == NULL ) { | 726 if ( convert == NULL ) { |