From fdfcdca978ffcb21472d0b0f6025557678ff35da Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 14 Mar 2022 01:15:51 +0200 Subject: [PATCH] fbdev: don't clear more than needed it wastes time for something like psx that may change modes ingame --- linux/fbdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.5