Integrate save functionality into main loop
- Add save_basic.h include to main.c - Wire up A button to trigger save operations - Update version to 0.2
This commit is contained in:
parent
adfc526f6c
commit
0ccd79677d
1 changed files with 7 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
|
#include "save_basic.h"
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
@ -12,7 +13,8 @@ int main(int argc, char **argv)
|
||||||
PadState pad;
|
PadState pad;
|
||||||
padInitializeDefault(&pad);
|
padInitializeDefault(&pad);
|
||||||
|
|
||||||
printf("BOTW Save Tool v0.1\n");
|
printf("BOTW Save Tool v0.2\n");
|
||||||
|
printf("Press A to test save loading\n");
|
||||||
printf("Press + to exit\n");
|
printf("Press + to exit\n");
|
||||||
|
|
||||||
// Main loop
|
// Main loop
|
||||||
|
|
@ -22,6 +24,10 @@ int main(int argc, char **argv)
|
||||||
u64 kDown = padGetButtonsDown(&pad);
|
u64 kDown = padGetButtonsDown(&pad);
|
||||||
|
|
||||||
if (kDown & HidNpadButton_Plus) break;
|
if (kDown & HidNpadButton_Plus) break;
|
||||||
|
if (kDown & HidNpadButton_A) {
|
||||||
|
openSave();
|
||||||
|
processSave();
|
||||||
|
}
|
||||||
|
|
||||||
consoleUpdate(NULL);
|
consoleUpdate(NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue