Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 14, 2002
1 parent 5fa5b7a commit f7f11f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/video/SDL_surface.c
Expand Up @@ -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,
Expand Down

0 comments on commit f7f11f5

Please sign in to comment.