Skip to content

Commit

Permalink
Converted surfaces with alpha format default to SDL_BLENDMODE_BLEND
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 17, 2024
1 parent f22eedc commit 0236d94
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/video/SDL_surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1590,8 +1590,7 @@ SDL_Surface *SDL_ConvertSurfaceAndColorspace(SDL_Surface *surface, SDL_PixelForm

/* Enable alpha blending by default if the new surface has an
* alpha channel or alpha modulation */
if ((SDL_ISPIXELFORMAT_ALPHA(surface->format) && SDL_ISPIXELFORMAT_ALPHA(format)) ||
(palette_has_alpha && SDL_ISPIXELFORMAT_ALPHA(format)) ||
if (SDL_ISPIXELFORMAT_ALPHA(format) ||
(copy_flags & SDL_COPY_MODULATE_ALPHA)) {
SDL_SetSurfaceBlendMode(convert, SDL_BLENDMODE_BLEND);
}
Expand Down

0 comments on commit 0236d94

Please sign in to comment.