Skip to content

Commit

Permalink
Update for new libnx hid api
Browse files Browse the repository at this point in the history
  • Loading branch information
averne committed Oct 10, 2022
1 parent 7eae0de commit e819f4f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,18 @@ int main(int argc, char **argv)
printf("Press + to exit\n");
printf("Fonts will be dumped to %s\n", TARGET_DIR);

PadState pad;
padConfigureInput(1, HidNpadStyleSet_NpadStandard);
padInitializeDefault(&pad);

int font_dump_started = 0;
while(appletMainLoop())
{
hidScanInput();
padUpdate(&pad);

u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
if (kDown & KEY_PLUS) break;
else if (kDown & KEY_A && !font_dump_started)
u64 kDown = padGetButtonsDown(&pad);
if (kDown & HidNpadButton_Plus) break;
else if (kDown & HidNpadButton_A && !font_dump_started)
{
printf("Dumping... This may take a while\n");
consoleUpdate(NULL);
Expand Down

0 comments on commit e819f4f

Please sign in to comment.