X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/779b8ca85ab0f4cc686f9bb3ffe622fef404b99e..ec5f9ca5fe08d25c5a9e281f1e697dea8e4066db:/video/generic.c diff --git a/video/generic.c b/video/generic.c index 319b5ad..8c6866d 100644 --- a/video/generic.c +++ b/video/generic.c @@ -28,11 +28,11 @@ void copy_pixels_generic32(char *buf, int x, int y, int width, int height) int cx, cy; unsigned int *ibuf = (unsigned int *)buf; unsigned int *fbuf; - for (cy = y; cy < (y + height); cy++) + for (cy = 0; cy < height; cy++) { fbuf = (unsigned int *)fb->fbaddr; - fbuf += cy * (fb->curmode.xres) + x; - for (cx = x; cx < (x + width); cx++) + fbuf += (cy + y) * (fb->curmode.xres) + x; + for (cx = 0; cx < width; cx++) *(ibuf++) = *(fbuf++); } }