mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
Warning free SOIL lib.
This commit is contained in:
parent
1c01fd9c9d
commit
a76059377d
5
Externals/SOIL/stb_image_aug.c
vendored
5
Externals/SOIL/stb_image_aug.c
vendored
@ -2394,6 +2394,7 @@ static int parse_png_file(png *z, int scan, int req_comp)
|
|||||||
// if critical, fail
|
// if critical, fail
|
||||||
if ((c.type & (1 << 29)) == 0) {
|
if ((c.type & (1 << 29)) == 0) {
|
||||||
#ifndef STBI_NO_FAILURE_STRINGS
|
#ifndef STBI_NO_FAILURE_STRINGS
|
||||||
|
#ifndef STBI_FAILURE_USERMSG
|
||||||
// not threadsafe
|
// not threadsafe
|
||||||
static char invalid_chunk[] = "XXXX chunk not known";
|
static char invalid_chunk[] = "XXXX chunk not known";
|
||||||
invalid_chunk[0] = (uint8) (c.type >> 24);
|
invalid_chunk[0] = (uint8) (c.type >> 24);
|
||||||
@ -2401,6 +2402,7 @@ static int parse_png_file(png *z, int scan, int req_comp)
|
|||||||
invalid_chunk[2] = (uint8) (c.type >> 8);
|
invalid_chunk[2] = (uint8) (c.type >> 8);
|
||||||
invalid_chunk[3] = (uint8) (c.type >> 0);
|
invalid_chunk[3] = (uint8) (c.type >> 0);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
return e(invalid_chunk, "PNG not supported: unknown chunk type");
|
return e(invalid_chunk, "PNG not supported: unknown chunk type");
|
||||||
}
|
}
|
||||||
skip(s, c.length);
|
skip(s, c.length);
|
||||||
@ -2584,7 +2586,7 @@ static int shiftsigned(int v, int shift, int bits)
|
|||||||
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
|
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
|
||||||
{
|
{
|
||||||
uint8 *out;
|
uint8 *out;
|
||||||
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
|
unsigned int mr=0,mg=0,mb=0,ma=0;
|
||||||
stbi_uc pal[256][4];
|
stbi_uc pal[256][4];
|
||||||
int psize=0,i,j,compress=0,width;
|
int psize=0,i,j,compress=0,width;
|
||||||
int bpp, flip_vertically, pad, target, offset, hsz;
|
int bpp, flip_vertically, pad, target, offset, hsz;
|
||||||
@ -2634,7 +2636,6 @@ static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
|
|||||||
mg = 0xff << 8;
|
mg = 0xff << 8;
|
||||||
mb = 0xff << 0;
|
mb = 0xff << 0;
|
||||||
ma = 0xff << 24;
|
ma = 0xff << 24;
|
||||||
fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
|
|
||||||
} else {
|
} else {
|
||||||
mr = 31 << 10;
|
mr = 31 << 10;
|
||||||
mg = 31 << 5;
|
mg = 31 << 5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user