mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-24 04:55:23 +00:00
SDL_bmp.c: restore most of the original formatting.
This commit is contained in:
parent
847bd8d983
commit
b21338eb54
|
@ -390,8 +390,9 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
|
|||
}
|
||||
|
||||
/* Create a compatible surface, note that the colors are RGB ordered */
|
||||
surface = SDL_CreateRGBSurface(0,
|
||||
biWidth, biHeight, biBitCount, Rmask, Gmask, Bmask, Amask);
|
||||
surface =
|
||||
SDL_CreateRGBSurface(0, biWidth, biHeight, biBitCount, Rmask, Gmask,
|
||||
Bmask, Amask);
|
||||
if (surface == NULL) {
|
||||
was_error = SDL_TRUE;
|
||||
goto done;
|
||||
|
@ -460,8 +461,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
|
|||
pad = (((bmpPitch) % 4) ? (4 - ((bmpPitch) % 4)) : 0);
|
||||
break;
|
||||
default:
|
||||
pad = ((surface->pitch%4) ?
|
||||
(4-(surface->pitch%4)) : 0);
|
||||
pad = ((surface->pitch % 4) ? (4 - (surface->pitch % 4)) : 0);
|
||||
break;
|
||||
}
|
||||
if (topDown) {
|
||||
|
@ -500,7 +500,7 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
|
|||
was_error = SDL_TRUE;
|
||||
goto done;
|
||||
}
|
||||
if (biBitCount == 8 && palette && biClrUsed < (1 << biBitCount)) {
|
||||
if (biBitCount == 8 && palette && biClrUsed < (1u << biBitCount)) {
|
||||
for (i = 0; i < surface->w; ++i) {
|
||||
if (bits[i] >= biClrUsed) {
|
||||
SDL_SetError("A BMP image contains a pixel with a color out of the palette");
|
||||
|
|
Loading…
Reference in a new issue