aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp/image_native.c
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-01-18 20:28:33 +0100
committerJoel Bodenmann <joel@unormal.org>2014-01-18 20:28:33 +0100
commitd5c52f342fab14acdef66c85c6c7f850290dd3f5 (patch)
tree6ac4eae965c9097302f2f92e4a004434da6f3ceb /src/gdisp/image_native.c
parent3a08f65cfcd884b454e835e6319d949e51e0b428 (diff)
parent07f940e7999e6dfb3d04c2cd45f4c29c6e385f85 (diff)
downloaduGFX-d5c52f342fab14acdef66c85c6c7f850290dd3f5.tar.gz
uGFX-d5c52f342fab14acdef66c85c6c7f850290dd3f5.tar.bz2
uGFX-d5c52f342fab14acdef66c85c6c7f850290dd3f5.zip
Merge branch 'gwin' of bitbucket.org:Tectu/ugfx into gwin
Diffstat (limited to 'src/gdisp/image_native.c')
-rw-r--r--src/gdisp/image_native.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gdisp/image_native.c b/src/gdisp/image_native.c
index 72ae8b61..7f249ae8 100644
--- a/src/gdisp/image_native.c
+++ b/src/gdisp/image_native.c
@@ -107,7 +107,7 @@ gdispImageError gdispImageGDraw_NATIVE(GDisplay *g, gdispImage *img, coord_t x,
}
/* For this image decoder we cheat and just seek straight to the region we want to display */
- pos = FRAME0POS + (img->width * sy + cx) * sizeof(pixel_t);
+ pos = FRAME0POS + (img->width * sy + sx) * sizeof(pixel_t);
/* Cycle through the lines */
for(;cy;cy--, y++) {
@@ -119,7 +119,7 @@ gdispImageError gdispImageGDraw_NATIVE(GDisplay *g, gdispImage *img, coord_t x,
// Read the data
len = img->io.fns->read(&img->io,
img->priv->buf,
- mx > BLIT_BUFFER_SIZE ? (BLIT_BUFFER_SIZE*sizeof(pixel_t)) : (mx * sizeof(pixel_t)))
+ mcx > BLIT_BUFFER_SIZE ? (BLIT_BUFFER_SIZE*sizeof(pixel_t)) : (mcx * sizeof(pixel_t)))
/ sizeof(pixel_t);
if (!len)
return GDISP_IMAGE_ERR_BADDATA;