Browse code

Using ppu_clear on resize

neauoire authored on 20/12/2021 17:42:29
Showing 2 changed files
... ...
@@ -43,10 +43,10 @@ ppu_resize(Ppu *p, Uint16 width, Uint16 height)
43 43
 	Uint8 *pixels;
44 44
 	if(!(pixels = realloc(p->pixels, width * height / 2)))
45 45
 		return;
46
-	memset(pixels, 0, width * height / 2);
47 46
 	p->pixels = pixels;
48 47
 	p->width = width;
49 48
 	p->height = height;
49
+	ppu_clear(p, 0x00);
50 50
 }
51 51
 
52 52
 void
... ...
@@ -1,6 +1,5 @@
1 1
 #include <stdio.h>
2 2
 #include <stdlib.h>
3
-#include <string.h>
4 3
 
5 4
 /*
6 5
 Copyright (c) 2021 Devine Lu Linvega