Skip to content

Commit

Permalink
Merge commit 'c93e3b36074ddb2ed986cbacc5e9d4f3a60db343' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 7, 2021
2 parents a734cce + c93e3b3 commit 572dfb4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/video/SDL_RLEaccel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1423,9 +1423,12 @@ SDL_RLESurface(SDL_Surface * surface)
return -1;
}

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

Expand Down

0 comments on commit 572dfb4

Please sign in to comment.