summaryrefslogtreecommitdiff
path: root/src/fb.h
diff options
context:
space:
mode:
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