memory handling

This commit is contained in:
Thuc Chi Do committed 2025-08-11 06:05:07 -04:00
1 parent da7d0ac1c7
commit d2b3f5dbaa
1 file changed
+3 -2
+3 -2
View File
@@ -50,9 +50,10 @@ void writePicToFBuff(void *fb, void *img, u16 x, u16 y) {
}
}
void flushBuffs(u8 *buf) {
u8* flushBuffs(u8 *buf) {
free(buf);
buf = malloc(BUFSIZE);
return buf;
}
void takePicture(u8 *buf) {
@@ -125,7 +126,7 @@ int main(int argc, char* argv[])
u32 kDown = hidKeysDown();
if (kDown & KEY_START) {
printf("start presed\n");
flushBuffs(buf);
buf = flushBuffs(buf);
gfxFlushBuffers();
gspWaitForVBlank();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.