From 73eac7c88dd9ac688345e772645a7d0b980d82ed Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Sat, 4 May 2024 20:42:53 -0400 Subject: [PATCH] Make owl saves not get deleted on load if autosaving is enabled, updated autosave description --- assets/config_menu/general.rml | 5 +++-- patches/autosaving.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/config_menu/general.rml b/assets/config_menu/general.rml index 4ca6931..0d60f2e 100644 --- a/assets/config_menu/general.rml +++ b/assets/config_menu/general.rml @@ -179,9 +179,10 @@ This setting does not affect keyboard input.

- Enables or disables the autosave feature. + Turns on autosaving and prevents owl saves from being deleted on load. If an owl save exists when an autosave is made, the owl save will get replaced.
- If any owl save exists when an autosave is made, the owl save will get replaced. +
+ If autosaving is disabled, existing autosaves will be deleted when loaded.

diff --git a/patches/autosaving.c b/patches/autosaving.c index 423086a..98d4f17 100644 --- a/patches/autosaving.c +++ b/patches/autosaving.c @@ -88,8 +88,8 @@ void func_80147314(SramContext* sramCtx, s32 fileNum) { s32 save_type = gSaveContext.save.isOwlSave; gSaveContext.save.isOwlSave = false; - // @recomp Check if this owl save was actually an autosave and don't clear it if so. - if (save_type != SAVE_TYPE_AUTOSAVE) { + // @recomp Prevent owl save/autosave deletion if autosaving is enabled. + if (!recomp_autosave_enabled()) { gSaveContext.save.saveInfo.playerData.newf[0] = '\0'; gSaveContext.save.saveInfo.playerData.newf[1] = '\0'; gSaveContext.save.saveInfo.playerData.newf[2] = '\0';