From 447e68a65948f2515bff87feca5f1bf5be863026 Mon Sep 17 00:00:00 2001 From: rozlette Date: Thu, 23 Jun 2022 21:58:08 -0500 Subject: [PATCH] Fixed some instances where the original OOT save is erroneously preserved or recreated, leading to another conversion next time you launched the game --- soh/soh/OTRGlobals.cpp | 1 - soh/soh/SaveManager.cpp | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index d9e7949c5..eff66f700 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -56,7 +56,6 @@ OTRGlobals::OTRGlobals() { context = Ship::GlobalCtx2::CreateInstance("Ship of Harkinian"); gSaveStateMgr = std::make_shared(); context->GetWindow()->Init(); - CheckSaveFile(SRAM_SIZE); } OTRGlobals::~OTRGlobals() { diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index e4e7fbbdc..31a9b6aec 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -51,6 +51,7 @@ void SaveManager::Init() { // If there is a lingering unversioned save, convert it if (std::filesystem::exists("oot_save.sav")) { ConvertFromUnversioned(); + std::filesystem::rename("oot_save.sav", "oot_save.bak"); } // If the global save file exist, load it. Otherwise, create it. @@ -1172,8 +1173,6 @@ void SaveManager::ConvertFromUnversioned() { } } - std::filesystem::rename("oot_save.sav", "oot_save.bak"); - #undef SLOT_SIZE #undef SLOT_OFFSET }