From: notaz Date: Sun, 13 Mar 2022 23:15:51 +0000 (+0200) Subject: fbdev: don't clear more than needed X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdfcdca978ffcb21472d0b0f6025557678ff35da;p=libpicofe.git fbdev: don't clear more than needed it wastes time for something like psx that may change modes ingame --- diff --git a/linux/fbdev.c b/linux/fbdev.c index 0718861..d8d78eb 100644 --- a/linux/fbdev.c +++ b/linux/fbdev.c @@ -155,7 +155,8 @@ out: void vout_fbdev_clear(struct vout_fbdev *fbdev) { - memset(fbdev->mem, 0, fbdev->mem_size); + if (fbdev->mem) + memset(fbdev->mem, 0, fbdev->fb_size * fbdev->buffer_count); } void vout_fbdev_clear_lines(struct vout_fbdev *fbdev, int y, int count)