mirror of
https://github.com/libretro/RetroArch
synced 2025-03-18 13:20:57 +00:00
(gfx/rpng) Correct copy_line_bw
This commit is contained in:
parent
f71c00112a
commit
639fc61f60
@ -303,11 +303,10 @@ static inline void copy_line_rgba(uint32_t *data,
|
||||
static inline void copy_line_bw(uint32_t *data,
|
||||
const uint8_t *decoded, unsigned width, unsigned depth)
|
||||
{
|
||||
unsigned i, bit = 0;
|
||||
unsigned i, bit;
|
||||
static const unsigned mul_table[] = { 0, 0xff, 0x55, 0, 0x11, 0, 0, 0, 0x01 };
|
||||
unsigned mul = mul_table[depth];
|
||||
unsigned mask = (1 << depth) - 1;
|
||||
|
||||
unsigned mul, mask;
|
||||
|
||||
if (depth == 16)
|
||||
{
|
||||
for (i = 0; i < width; i++)
|
||||
@ -318,6 +317,10 @@ static inline void copy_line_bw(uint32_t *data,
|
||||
return;
|
||||
}
|
||||
|
||||
mul = mul_table[depth];
|
||||
mask = (1 << depth) - 1;
|
||||
bit = 0;
|
||||
|
||||
for (i = 0; i < width; i++, bit += depth)
|
||||
{
|
||||
unsigned byte = bit >> 3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user