summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScot Doyle <lkml14@scotdoyle.com>2016-02-17 13:10:34 -0800
committerKeith Packard <keithp@keithp.com>2016-02-17 13:11:18 -0800
commit0177ce96b02f8a42d690861c4245fe922bd4b34b (patch)
tree27275516ca3fccec49d7f492819e6be40c0f48c7
parent801baef3f16b57186efacedf76b3ada9f4bd6cb5 (diff)
Paint backwards was using wrong y computationHEADmaster
-rw-r--r--shmfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shmfd.c b/shmfd.c
index 2094efa..4d6d388 100644
--- a/shmfd.c
+++ b/shmfd.c
@@ -87,7 +87,7 @@ paint(uint32_t *base, int width, int height, int forward)
if (forward)
b = y * 256 / height;
else
- b = (255 - y) * 256 / height;
+ b = (height - y) * 256 / height;
base[y * width + x] = (r << 16) | (g << 8) | b;
}
}