diff options
author | Alex Auvolat <alex@adnab.me> | 2016-07-14 11:45:11 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2016-07-14 11:45:11 +0200 |
commit | 2f13288a23da4dfaf6c40e1e943f83d8fa43145a (patch) | |
tree | 3b550ad22a00676470ceb2815afd21f42dfd8aae /src/lib/libkogata/draw.c | |
parent | 477911553e0443fcafad5bd96c97314aa2f8d9ea (diff) | |
download | kogata-2f13288a23da4dfaf6c40e1e943f83d8fa43145a.tar.gz kogata-2f13288a23da4dfaf6c40e1e943f83d8fa43145a.zip |
Fix sme warnings...
Diffstat (limited to 'src/lib/libkogata/draw.c')
-rw-r--r-- | src/lib/libkogata/draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |