Create minimal Switch homebrew application. - Initialize console and input handling - Basic event loop with exit on Plus button - Foundation for BOTW save tool
31 lines
No EOL
615 B
C
31 lines
No EOL
615 B
C
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <switch.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
consoleInit(NULL);
|
|
|
|
// Configure input
|
|
padConfigureInput(1, HidNpadStyleSet_NpadStandard);
|
|
PadState pad;
|
|
padInitializeDefault(&pad);
|
|
|
|
printf("BOTW Save Tool v0.1\n");
|
|
printf("Press + to exit\n");
|
|
|
|
// Main loop
|
|
while(appletMainLoop())
|
|
{
|
|
padUpdate(&pad);
|
|
u64 kDown = padGetButtonsDown(&pad);
|
|
|
|
if (kDown & HidNpadButton_Plus) break;
|
|
|
|
consoleUpdate(NULL);
|
|
}
|
|
|
|
consoleExit(NULL);
|
|
return 0;
|
|
} |