Project

General

Profile

Feature #869 ยป 0040-sdl3-Update-SDL_GetSurfaceColorKey-return-value-chec.patch

Marko Lindqvist, 09/17/2024 06:53 PM

View differences:

client/gui-sdl3/graphics.c
minY = surf->h;
maxY = 0;
if (SDL_GetSurfaceColorKey(surf, &colorkey) < 0) {
if (!SDL_GetSurfaceColorKey(surf, &colorkey)) {
/* Use alpha instead of colorkey */
mask = surf->format->Amask;
colorkey = 0;
client/gui-sdl3/gui_string.c
/* Create and fill surface */
if (SDL_GetSurfaceColorKey(tmp[0], &color) < 0) {
if (!SDL_GetSurfaceColorKey(tmp[0], &color)) {
color = SDL_MapRGBA(SDL_GetPixelFormatDetails(tmp[0]->format), NULL,
0, 0, 0, 0);
}
    (1-1/1)