Using ppu_clear on resize
This commit is contained in:
parent
6c64678829
commit
5ebeaf6852
|
@ -43,10 +43,10 @@ ppu_resize(Ppu *p, Uint16 width, Uint16 height)
|
||||||
Uint8 *pixels;
|
Uint8 *pixels;
|
||||||
if(!(pixels = realloc(p->pixels, width * height / 2)))
|
if(!(pixels = realloc(p->pixels, width * height / 2)))
|
||||||
return;
|
return;
|
||||||
memset(pixels, 0, width * height / 2);
|
|
||||||
p->pixels = pixels;
|
p->pixels = pixels;
|
||||||
p->width = width;
|
p->width = width;
|
||||||
p->height = height;
|
p->height = height;
|
||||||
|
ppu_clear(p, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2021 Devine Lu Linvega
|
Copyright (c) 2021 Devine Lu Linvega
|
||||||
|
|
Loading…
Reference in New Issue