mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed bug #2881 - SDL_RLEsurface may encode RGB888 if it has no color key (Thanks Simon Hug)
To encode with BLEND mode, it needs a valid alpha channel
This commit is contained in:
parent
b626429745
commit
c93e3b3607
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user