summaryrefslogtreecommitdiff
path: root/src/fb.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-04-27 09:37:39 -0700
committerVito Caputo <vcaputo@pengaru.com>2017-04-27 09:37:39 -0700
commit3d4ab5e29e6187d5e97892a7f8a1ce73e809e0cd (patch)
tree8c1963eb78b005e08bb6d23ce66b5ed743f054f7 /src/fb.h
parent3e2d1db3952e65e347faf496800ede12231c3b76 (diff)
fb: apply fragment coordinates put pixel helper
fb_fragment_put_pixel_unchecked() assumed the x,y coordinates of the fragment were always 0.
Diffstat (limited to 'src/fb.h')
-rw-r--r--src/fb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fb.h b/src/fb.h
index c1cee17..6fdca11 100644
--- a/src/fb.h
+++ b/src/fb.h
@@ -55,7 +55,7 @@ static inline void fb_fragment_put_pixel_unchecked(fb_fragment_t *fragment, int
uint32_t *pixels = fragment->buf;
/* FIXME this assumes stride is aligned to 4 */
- pixels[(y * (fragment->width + (fragment->stride >> 2))) + x] = pixel;
+ pixels[((y - fragment->y) * (fragment->width + (fragment->stride >> 2))) + (x - fragment->x)] = pixel;
}
© All Rights Reserved