This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/ninjhax/source/hid.c

28 lines
445 B
C
Raw Normal View History

2015-08-05 12:31:17 +02:00
#include <3ds.h>
#include <stdio.h>
2015-08-05 12:31:17 +02:00
/* loop until key is pressed */
void wait_key (void) {
2015-08-05 12:31:17 +02:00
hidScanInput();
u32 old_kDown, kDown;
old_kDown = hidKeysDown();
while (aptMainLoop()) {
gspWaitForVBlank();
hidScanInput();
kDown = hidKeysDown();
if (kDown != old_kDown)
break;
gfxFlushBuffers();
gfxSwapBuffers();
}
}
/* convenience function */
void wait_any_key (void) {
printf("\n\nPress key to continue\n");
wait_key();
}