From e92f242e687bdf36ee5d2054bab613c04c458cd7 Mon Sep 17 00:00:00 2001 From: AnalogMan151 Date: Sat, 23 Jun 2018 13:17:29 -0400 Subject: [PATCH] Automated Master Mode detection --- .gitignore | 36 ++++++++++++++++++++++++++++++++++++ README.md | 2 +- source/main.c | 18 ++++-------------- 3 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0934cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Switch +*.nro +*.nca +*.elf +*.nacp +*.nso +*.pfs0 +build/ \ No newline at end of file diff --git a/README.md b/README.md index 1b2c033..01b3dc3 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ A Work in Progress Save Editor, currently it only to modifies rupees, durability # Compile -- Use LibNX. +- Use LibNX. Needs SDL2, SDL2_ttf, SDL2_gfx and SDL2_image. # Disclaimer diff --git a/source/main.c b/source/main.c index 2926c7e..6a8cfeb 100644 --- a/source/main.c +++ b/source/main.c @@ -37,6 +37,10 @@ void startSDLServices(){ errorScreen(); } else{ + if (file_exist("save:/6/caption.jpg")) + maxSlot = 7; + else + maxSlot = 5; getCaption(); selectSlotMenu(slot); } @@ -75,10 +79,8 @@ void initServices(){ currentPage = 1; currentState = 0; currentItem = 0; - maxSlot = 5; romfsInit(); startSDLServices(); - } void setPages(){ @@ -503,18 +505,6 @@ int main(int argc, char **argv){ if (kDown & KEY_DLEFT) buttonLogic(3); if (kDown & KEY_A) ConfirmButton(); - if(currentState == 0 && kDown & KEY_R){ - if(maxSlot == 7){ - maxSlot = 5; - } - else{ - maxSlot = 7; - } - slot = 0; - getCaption(); - selectSlotMenu(slot); - } - if(currentState <= 0){ if (kDown & KEY_PLUS) break; }