Project

General

Profile

Bug #370 ยป 0040-sdl3-Update-to-new-SDL_PixelFormat-field-names.patch

Marko Lindqvist, 03/29/2024 10:58 AM

View differences:

client/gui-sdl3/graphics.c
if (surf == NULL) {
log_error(_("Unable to create Sprite (Surface) of size "
"%d x %d %d Bits"),
width, height, pf->BitsPerPixel);
width, height, pf->bits_per_pixel);
return NULL;
}
......
return 0x0;
}
switch (surf->format->BytesPerPixel) {
switch (surf->format->bytes_per_pixel) {
case 1:
return *(Uint8 *) ((Uint8 *) surf->pixels + y * surf->pitch + x);
......
return 0;
}
switch (surf->format->BytesPerPixel) {
switch (surf->format->bytes_per_pixel) {
case 1:
return *((Uint8 *)surf->pixels);
......
lock_surf(surf);
switch (surf->format->BytesPerPixel) {
switch (surf->format->bytes_per_pixel) {
case 1:
{
Uint8 *pixel = (Uint8 *)surf->pixels;
dependencies/SDL3_gfx/SDL3_rotozoom.c
return NULL;
}
if ((src->format->BitsPerPixel % 8) != 0) {
if ((src->format->bits_per_pixel % 8) != 0) {
SDL_SetError("Invalid source surface bit depth");
return NULL;
}
......
}
/* Calculate byte-per-pixel */
bpp = src->format->BitsPerPixel / 8;
bpp = src->format->bits_per_pixel / 8;
switch(normalizedClockwiseTurns) {
case 0: /* Make a copy of the surface */
......
/*
* Determine if source surface is 32bit or 8bit
*/
if ((src->format->BitsPerPixel == 32) || (src->format->BitsPerPixel == 8)) {
if ((src->format->bits_per_pixel == 32)
|| (src->format->bits_per_pixel == 8)) {
/*
* Use source surface 'as is'
*/
......
/*
* Determine if source surface is 32bit or 8bit
*/
if ((src->format->BitsPerPixel == 32) || (src->format->BitsPerPixel == 8)) {
if ((src->format->bits_per_pixel == 32)
|| (src->format->bits_per_pixel == 8)) {
/*
* Use source surface 'as is'
*/
......
/*
* Determine if source surface is 32bit or 8bit
*/
if ((src->format->BitsPerPixel == 32) || (src->format->BitsPerPixel == 8)) {
if ((src->format->bits_per_pixel == 32)
|| (src->format->bits_per_pixel == 8)) {
/*
* Use source surface 'as is'
*/
    (1-1/1)