summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbriaguya <70942617+briaguya-ai@users.noreply.github.com>2022-10-01 13:48:46 -0400
committerGitHub <noreply@github.com>2022-10-01 19:48:46 +0200
commit36e40665bb51a76f36a459524c8419c5b9e403f3 (patch)
tree3ccbee3a2ff164e5dfb78ba0fb56e1f85a22e7a8
parent9804035dc013d505b0ef13ae3a56310be816b1fc (diff)
fix: don't hardcode path for global.sav (#1656)4.0.1
Co-authored-by: briaguya <briaguya@alice>
-rw-r--r--soh/soh/SaveManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp
index 1eafcf642..80ed3648a 100644
--- a/soh/soh/SaveManager.cpp
+++ b/soh/soh/SaveManager.cpp
@@ -543,7 +543,10 @@ void SaveManager::SaveGlobal() {
globalBlock["zTargetSetting"] = gSaveContext.zTargetSetting;
globalBlock["language"] = gSaveContext.language;
- std::ofstream output("Save/global.sav");
+ const std::filesystem::path sSavePath(Ship::Window::GetPathRelativeToAppDirectory("Save"));
+ const std::filesystem::path sGlobalPath = sSavePath / std::string("global.sav");
+
+ std::ofstream output(sGlobalPath);
output << std::setw(4) << globalBlock << std::endl;
}