Hi
Another difficult question, I have some flickering in my Paddle Puffle game. Especially when drawing to the bottom screen. I'm using libctru and a loop like this:
Some suggestions to avoid the bottom screen flickering?
Another difficult question, I have some flickering in my Paddle Puffle game. Especially when drawing to the bottom screen. I'm using libctru and a loop like this:
Code:
while (aptMainLoop () && !done) {
last_time = svcGetSystemTick ();
hidScanInput ();
keys = hidKeysDown ();
if (keys & KEY_START) {
done = 1;
}
// Draw all the stuff to the top screen here
//Wait for VBlank
gspWaitForVBlank();
gfxFlushBuffers();
gfxSwapBuffers();
// Draw all stuff to the bottom screen here
// Here is the flickering !!!
now_time = svcGetSystemTick ();
if (now_time < last_time + FPS) svcSleepThread (last_time + FPS - now_time);
}
Some suggestions to avoid the bottom screen flickering?