Project

General

Profile

Feature #866 ยป 0037-sdl3-Update-SDL_MapRGB-calls.patch

Marko Lindqvist, 09/15/2024 09:43 PM

View differences:

client/gui-sdl3/graphics.c
if (pcolor->a == 255) {
return SDL_FillSurfaceRect(surf, prect,
SDL_MapRGB(surf->format,
SDL_MapRGB(SDL_GetPixelFormatDetails(surf->format),
NULL,
pcolor->r, pcolor->g, pcolor->b));
}
......
colorbar = create_surf(surf->w, surf->h);
SDL_FillSurfaceRect(colorbar, prect,
SDL_MapRGB(surf->format,
SDL_MapRGB(SDL_GetPixelFormatDetails(surf->format),
NULL,
pcolor->r, pcolor->g, pcolor->b));
return alphablit(colorbar, NULL, surf, NULL, pcolor->a);
client/gui-sdl3/gui_tilespec.c
/* ================================================================= */
icons->worklist = create_surf(9, 9);
SDL_FillSurfaceRect(icons->worklist, NULL,
SDL_MapRGB(icons->worklist->format, 255, 255,255));
SDL_MapRGB(SDL_GetPixelFormatDetails(icons->worklist->format),
NULL, 255, 255,255));
create_frame(icons->worklist,
0, 0, icons->worklist->w - 1, icons->worklist->h - 1,
    (1-1/1)