Skip to content

Commit

Permalink
Fixed some instances where the original OOT save is erroneously prese…
Browse files Browse the repository at this point in the history
…rved or recreated, leading to another conversion next time you launched the game
  • Loading branch information
Rozelette authored and Kenix3 committed Jun 26, 2022
1 parent 0f84682 commit 447e68a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ OTRGlobals::OTRGlobals() {
context = Ship::GlobalCtx2::CreateInstance("Ship of Harkinian");
gSaveStateMgr = std::make_shared<SaveStateMgr>();
context->GetWindow()->Init();
CheckSaveFile(SRAM_SIZE);
}

OTRGlobals::~OTRGlobals() {
Expand Down
3 changes: 1 addition & 2 deletions soh/soh/SaveManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -1172,8 +1173,6 @@ void SaveManager::ConvertFromUnversioned() {
}
}

std::filesystem::rename("oot_save.sav", "oot_save.bak");

#undef SLOT_SIZE
#undef SLOT_OFFSET
}
Expand Down

0 comments on commit 447e68a

Please sign in to comment.