commit 5ebeaf6852d1b8e122c6b3d9f8cf52d33651c65e
parent 6c646788292d891c6a60e01d9a707127570ef282
Author: neauoire <aliceffekt@gmail.com>
Date: Mon, 20 Dec 2021 09:42:29 -0800
Using ppu_clear on resize
Diffstat:
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git 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
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
/*
Copyright (c) 2021 Devine Lu Linvega