Created
November 14, 2019 15:28
-
-
Save friedkeenan/158daa5578fbe20796da450cf8084c5f to your computer and use it in GitHub Desktop.
Minimal example to show the socketInitializeDefault hang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <switch.h> | |
int main(int argc, char **argv) { | |
consoleInit(NULL); | |
printf("Before socketInitializeDefault\n"); | |
consoleUpdate(NULL); | |
socketInitializeDefault(); | |
printf("After socketInitializeDefault\n"); | |
consoleUpdate(NULL); | |
printf("Press + to reload current NRO\n"); | |
printf("Press - to return to the homebrew menu\n"); | |
consoleUpdate(NULL); | |
while (appletMainLoop()) { | |
hidScanInput(); | |
u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO); | |
if (kDown & KEY_PLUS) { | |
envSetNextLoad(argv[0], argv[0]); | |
break; | |
} | |
if (kDown & KEY_MINUS) | |
break; | |
} | |
socketExit(); | |
consoleExit(NULL); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment