diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2019-12-30 11:47:47 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2019-12-30 11:47:47 +0100 |
commit | 04a4be65b7fce487b388ebd0a750ffbff954da91 (patch) | |
tree | 414b7694edd3055bb61b61378c7ce38de722050e | |
parent | 1dda6d8a1ac1ff1c7b93e89f6ee7020f24be8ee8 (diff) | |
download | fbtest-04a4be65b7fce487b388ebd0a750ffbff954da91.tar.gz |
cfb2: Fix cfb2_setpixel() return value
On cfb2, pixel values are in the range 0..3, not 0..15.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r-- | drawops/cfb2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drawops/cfb2.c b/drawops/cfb2.c index e3c92f7..04af886 100644 --- a/drawops/cfb2.c +++ b/drawops/cfb2.c @@ -39,7 +39,7 @@ static void cfb2_setpixel(u32 x, u32 y, pixel_t pixel) static pixel_t cfb2_getpixel(u32 x, u32 y) { - return (screen[y*screen_width+x/4] >> (2*(3- (x & 3)))) & 15; + return (screen[y*screen_width+x/4] >> (2*(3- (x & 3)))) & 3; } const struct drawops cfb2_drawops = { |