mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-30 21:40:59 +00:00
Fixed use of SDL_expand_byte after flipping from bit loss to bit count
This commit is contained in:
parent
cd25cb3435
commit
b07bd55baf
@ -131,15 +131,15 @@ extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface);
|
||||
}
|
||||
#define RGB_FROM_RGB565(Pixel, r, g, b) \
|
||||
{ \
|
||||
r = SDL_expand_byte[3][((Pixel & 0xF800) >> 11)]; \
|
||||
g = SDL_expand_byte[2][((Pixel & 0x07E0) >> 5)]; \
|
||||
b = SDL_expand_byte[3][(Pixel & 0x001F)]; \
|
||||
r = SDL_expand_byte[5][((Pixel & 0xF800) >> 11)]; \
|
||||
g = SDL_expand_byte[6][((Pixel & 0x07E0) >> 5)]; \
|
||||
b = SDL_expand_byte[5][(Pixel & 0x001F)]; \
|
||||
}
|
||||
#define RGB_FROM_RGB555(Pixel, r, g, b) \
|
||||
{ \
|
||||
r = SDL_expand_byte[3][((Pixel & 0x7C00) >> 10)]; \
|
||||
g = SDL_expand_byte[3][((Pixel & 0x03E0) >> 5)]; \
|
||||
b = SDL_expand_byte[3][(Pixel & 0x001F)]; \
|
||||
r = SDL_expand_byte[5][((Pixel & 0x7C00) >> 10)]; \
|
||||
g = SDL_expand_byte[5][((Pixel & 0x03E0) >> 5)]; \
|
||||
b = SDL_expand_byte[5][(Pixel & 0x001F)]; \
|
||||
}
|
||||
#define RGB_FROM_XRGB8888(Pixel, r, g, b) \
|
||||
{ \
|
||||
@ -386,7 +386,7 @@ extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface);
|
||||
r = ((Pixel >> 22) & 0xFF); \
|
||||
g = ((Pixel >> 12) & 0xFF); \
|
||||
b = ((Pixel >> 2) & 0xFF); \
|
||||
a = SDL_expand_byte[6][(Pixel >> 30)]; \
|
||||
a = SDL_expand_byte[2][(Pixel >> 30)]; \
|
||||
}
|
||||
#define RGBAFLOAT_FROM_ARGB2101010(Pixel, r, g, b, a) \
|
||||
{ \
|
||||
@ -400,7 +400,7 @@ extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface *surface);
|
||||
r = ((Pixel >> 2) & 0xFF); \
|
||||
g = ((Pixel >> 12) & 0xFF); \
|
||||
b = ((Pixel >> 22) & 0xFF); \
|
||||
a = SDL_expand_byte[6][(Pixel >> 30)]; \
|
||||
a = SDL_expand_byte[2][(Pixel >> 30)]; \
|
||||
}
|
||||
#define RGBAFLOAT_FROM_ABGR2101010(Pixel, r, g, b, a) \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user