SaveData fixes IXXXXXX (#3511)

* fixed possible savepath issue

* one more fix
This commit is contained in:
georgemoralis
2025-09-04 21:16:50 +03:00
committed by GitHub
parent bcbe07e6b1
commit e06667d307
2 changed files with 5 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
#include "common/elf_info.h"
#include "common/singleton.h"
#include "common/string_util.h"
#include "core/file_format/psf.h"
#include "core/file_sys/fs.h"
#include "core/libraries/save_data/save_instance.h"
#include "imgui/imgui_std.h"
@@ -66,7 +67,9 @@ SaveDialogState::SaveDialogState(const OrbisSaveDataDialogParam& param) {
this->enable_back = {param.optionParam->back == OptionBack::ENABLE};
}
const auto& game_serial = Common::ElfInfo::Instance().GameSerial();
const auto& game_serial = Common::Singleton<PSF>::Instance()
->GetString("INSTALL_DIR_SAVEDATA")
.value_or(ElfInfo::Instance().GameSerial());
const auto item = param.items;
this->user_id = item->userId;

View File

@@ -94,7 +94,7 @@ std::filesystem::path GetSavePath(OrbisUserServiceUserId user_id, u32 slot_id,
if (slot_id > 0) {
dir += std::to_string(slot_id);
}
return SaveInstance::MakeDirSavePath(user_id, Common::ElfInfo::Instance().GameSerial(), dir);
return SaveInstance::MakeDirSavePath(user_id, game_serial, dir);
}
size_t SetupSaveMemory(OrbisUserServiceUserId user_id, u32 slot_id, std::string_view game_serial,