X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=platform%2Flinux%2Ffbdev.c;h=dfe0d223df075c87f1098739889e99c67c4025f0;hb=45285368c0fad43f23f90888fde16106bdc0fd52;hp=532a282abc73f22cfab89374855e5dead902cd89;hpb=207e58ef9902ef9b2ca80cd6b42eeebf9a3f0e6d;p=picodrive.git diff --git a/platform/linux/fbdev.c b/platform/linux/fbdev.c index 532a282..dfe0d22 100644 --- a/platform/linux/fbdev.c +++ b/platform/linux/fbdev.c @@ -134,11 +134,11 @@ void vout_fbdev_clear(struct vout_fbdev *fbdev) void vout_fbdev_clear_lines(struct vout_fbdev *fbdev, int y, int count) { - int stride = fbdev->fbvar_new.xres * fbdev->fbvar_new.bits_per_pixel / 8; + int stride = fbdev->fbvar_new.xres_virtual * fbdev->fbvar_new.bits_per_pixel / 8; int i; - if (y + count > fbdev->fbvar_new.yres) - count = fbdev->fbvar_new.yres - y; + if (y + count > fbdev->top_border + fbdev->fbvar_new.yres) + count = fbdev->top_border + fbdev->fbvar_new.yres - y; if (y >= 0 && count > 0) for (i = 0; i < fbdev->buffer_count; i++)