examples: Fix potential tearing

The image needs to be switched during the vertical blanking period so
that no tearing is shown during the switch.
This commit is contained in:
Antonio Niño Díaz 2023-05-21 00:56:06 +01:00
parent 11b2717515
commit af329f901a

View File

@ -114,11 +114,11 @@ int main(int argc, char **argv)
}
}
// Swap backbuffer and visible buffers
NF_Flip16bitsBackBuffer(1);
// Wait for the screen refresh
swiWaitForVBlank();
// Swap backbuffer and visible buffers
NF_Flip16bitsBackBuffer(1);
}
return 0;