Add basic main.c with console setup
Create minimal Switch homebrew application. - Initialize console and input handling - Basic event loop with exit on Plus button - Foundation for BOTW save tool
This commit is contained in:
parent
3e7538fffd
commit
46e530be36
1 changed files with 31 additions and 0 deletions
31
source/main.c
Normal file
31
source/main.c
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue