mirror of
https://github.com/neon443/ColourCam3DS.git
synced 2026-03-11 13:26:17 +00:00
memory handling
This commit is contained in:
@@ -50,9 +50,10 @@ void writePicToFBuff(void *fb, void *img, u16 x, u16 y) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void flushBuffs(u8 *buf) {
|
u8* flushBuffs(u8 *buf) {
|
||||||
free(buf);
|
free(buf);
|
||||||
buf = malloc(BUFSIZE);
|
buf = malloc(BUFSIZE);
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void takePicture(u8 *buf) {
|
void takePicture(u8 *buf) {
|
||||||
@@ -125,7 +126,7 @@ int main(int argc, char* argv[])
|
|||||||
u32 kDown = hidKeysDown();
|
u32 kDown = hidKeysDown();
|
||||||
if (kDown & KEY_START) {
|
if (kDown & KEY_START) {
|
||||||
printf("start presed\n");
|
printf("start presed\n");
|
||||||
flushBuffs(buf);
|
buf = flushBuffs(buf);
|
||||||
gfxFlushBuffers();
|
gfxFlushBuffers();
|
||||||
|
|
||||||
gspWaitForVBlank();
|
gspWaitForVBlank();
|
||||||
|
|||||||
Reference in New Issue
Block a user