From a505b5f14bc28268d6366d1d9c231ab57ff0159d Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 9 Sep 2010 21:11:19 +0000 Subject: [PATCH] fbdev: fix clear_lines git-svn-id: file:///home/notaz/opt/svn/PicoDrive@891 be3aeb3a-fb24-0410-a615-afba39da0efa --- platform/linux/fbdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/linux/fbdev.c b/platform/linux/fbdev.c index 532a282a..dfe0d223 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++) -- 2.39.5