Merge commit 'c93e3b36074ddb2ed986cbacc5e9d4f3a60db343' into main

This commit is contained in:
Sam Lantinga 2021-05-07 12:28:27 -07:00
commit 572dfb4f6e
1 changed files with 6 additions and 3 deletions

View File

@ -1423,9 +1423,12 @@ SDL_RLESurface(SDL_Surface * surface)
return -1; return -1;
} }
/* If we don't have colorkey or blending, nothing to do... */ if (flags & SDL_COPY_COLORKEY) {
flags = surface->map->info.flags; /* ok */
if (!(flags & (SDL_COPY_COLORKEY | SDL_COPY_BLEND))) { } else if ((flags & SDL_COPY_BLEND) && surface->format->Amask) {
/* ok */
} else {
/* If we don't have colorkey or blending, nothing to do... */
return -1; return -1;
} }