- Add save_basic.h include to main.c - Wire up A button to trigger save operations - Update version to 0.2
37 lines
No EOL
785 B
C
37 lines
No EOL
785 B
C
#include <string.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <switch.h>
|
|
#include "save_basic.h"
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
consoleInit(NULL);
|
|
|
|
// Configure input
|
|
padConfigureInput(1, HidNpadStyleSet_NpadStandard);
|
|
PadState pad;
|
|
padInitializeDefault(&pad);
|
|
|
|
printf("BOTW Save Tool v0.2\n");
|
|
printf("Press A to test save loading\n");
|
|
printf("Press + to exit\n");
|
|
|
|
// Main loop
|
|
while(appletMainLoop())
|
|
{
|
|
padUpdate(&pad);
|
|
u64 kDown = padGetButtonsDown(&pad);
|
|
|
|
if (kDown & HidNpadButton_Plus) break;
|
|
if (kDown & HidNpadButton_A) {
|
|
openSave();
|
|
processSave();
|
|
}
|
|
|
|
consoleUpdate(NULL);
|
|
}
|
|
|
|
consoleExit(NULL);
|
|
return 0;
|
|
} |