Using ppu_clear on resize

This commit is contained in:
neauoire 2021-12-20 09:42:29 -08:00
parent 6c64678829
commit 5ebeaf6852
2 changed files with 1 additions and 2 deletions

View File

@ -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

View File

@ -1,6 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
Copyright (c) 2021 Devine Lu Linvega