]> Joshua Wise's Git repositories - netwatch.git/blobdiff - video/generic.c
make rfb use copy_pixels
[netwatch.git] / video / generic.c
index 319b5ad8054ea187017b0f609ced76a30f0de94b..8c6866d4bcad7ea9a65d1b4c8e13d95057ab5df4 100644 (file)
@@ -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++);
        }
 }
This page took 0.023409 seconds and 4 git commands to generate.