From 2f13288a23da4dfaf6c40e1e943f83d8fa43145a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 14 Jul 2016 11:45:11 +0200 Subject: Fix sme warnings... --- src/lib/libkogata/draw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libkogata/draw.c') diff --git a/src/lib/libkogata/draw.c b/src/lib/libkogata/draw.c index 53070ad..2806df4 100644 --- a/src/lib/libkogata/draw.c +++ b/src/lib/libkogata/draw.c @@ -88,7 +88,7 @@ void g_hline(fb_t *fb, int x, int y, int w, color_t c) { for (int u = x; u < x + w; u++) { fb->data[y * fb->geom.pitch + u] = (c & 0xFF); } - } else if (fb->geom.bpp == 15 || fb->geom.bpp == 15) { + } else if (fb->geom.bpp == 15 || fb->geom.bpp == 16) { for (int u = x; u < x + w; u++) { uint16_t *p = (uint16_t*)(fb->data + y * fb->geom.pitch + 2 * u); *p = (c & 0xFFFF); @@ -110,7 +110,7 @@ void g_vline(fb_t *fb, int x, int y, int h, color_t c) { for (int v = y; v < y + h; v++) { fb->data[v * fb->geom.pitch + x] = (c & 0xFF); } - } else if (fb->geom.bpp == 15 || fb->geom.bpp == 15) { + } else if (fb->geom.bpp == 15 || fb->geom.bpp == 16) { for (int v = y; v < y + h; v++) { uint16_t *p = (uint16_t*)(fb->data + v * fb->geom.pitch + 2 * x); *p = (c & 0xFFFF); @@ -145,7 +145,7 @@ void g_fillrect(fb_t *fb, int x, int y, int w, int h, color_t c) { fb->data[v * fb->geom.pitch + u] = (c & 0xFF); } } - } else if (fb->geom.bpp == 15 || fb->geom.bpp == 15) { + } else if (fb->geom.bpp == 15 || fb->geom.bpp == 16) { for (int v = y; v < y + h; v++) { for (int u = x; u < x + w; u++) { uint16_t *p = (uint16_t*)(fb->data + v * fb->geom.pitch + 2 * u); -- cgit v1.2.3