From 0ccd79677ddc01a09bfd9583e465d38eccf4b712 Mon Sep 17 00:00:00 2001 From: badbl0cks <4161747+badbl0cks@users.noreply.github.com> Date: Tue, 16 May 2023 15:27:51 -0700 Subject: [PATCH] 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 --- source/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/main.c b/source/main.c index 707f6f3..eb378b1 100644 --- a/source/main.c +++ b/source/main.c @@ -2,6 +2,7 @@ #include #include #include +#include "save_basic.h" int main(int argc, char **argv) { @@ -12,7 +13,8 @@ int main(int argc, char **argv) PadState 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"); // Main loop @@ -22,6 +24,10 @@ int main(int argc, char **argv) u64 kDown = padGetButtonsDown(&pad); if (kDown & HidNpadButton_Plus) break; + if (kDown & HidNpadButton_A) { + openSave(); + processSave(); + } consoleUpdate(NULL); }