changeset 2084:9d6c30c071ed

Simplify dmPutBits() call in dmWriteRAWRow().
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Dec 2018 15:17:32 +0200
parents feed844a5ae1
children b31bb3dc1310
files tools/libgfx.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/libgfx.c	Tue Dec 11 15:16:06 2018 +0200
+++ b/tools/libgfx.c	Tue Dec 11 15:17:32 2018 +0200
@@ -357,7 +357,7 @@
     for (int xc = 0; xc < img->width; xc++)
     {
         for (int xscale = 0; xscale < spec->scaleX; xscale++)
-        if (!dmPutBits(bs, (sp[xc] & (1 << plane)) ? 1 : 0, 1))
+        if (!dmPutBits(bs, (sp[xc] >> plane) & 1, 1))
             return FALSE;
     }
     return TRUE;