From 5ebeaf6852d1b8e122c6b3d9f8cf52d33651c65e Mon Sep 17 00:00:00 2001 From: neauoire Date: Mon, 20 Dec 2021 09:42:29 -0800 Subject: [PATCH] Using ppu_clear on resize --- src/devices/ppu.c | 2 +- src/devices/ppu.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/devices/ppu.c b/src/devices/ppu.c index 6a1b8be..35e5a61 100644 --- a/src/devices/ppu.c +++ b/src/devices/ppu.c @@ -43,10 +43,10 @@ ppu_resize(Ppu *p, Uint16 width, Uint16 height) Uint8 *pixels; if(!(pixels = realloc(p->pixels, width * height / 2))) return; - memset(pixels, 0, width * height / 2); p->pixels = pixels; p->width = width; p->height = height; + ppu_clear(p, 0x00); } void diff --git a/src/devices/ppu.h b/src/devices/ppu.h index 7911317..50e12d1 100644 --- a/src/devices/ppu.h +++ b/src/devices/ppu.h @@ -1,6 +1,5 @@ #include #include -#include /* Copyright (c) 2021 Devine Lu Linvega