mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-19 17:10:37 +00:00
SaveDataLib: use param.sfo to store max_blocks instead of txt (#1287)
This commit is contained in:
parent
01fb320f4e
commit
96344873d6
5 changed files with 25 additions and 23 deletions
|
@ -227,6 +227,12 @@ void PSF::AddBinary(std::string key, std::vector<u8> value, bool update) {
|
|||
map_binaries.emplace(entry_list.size() - 1, std::move(value));
|
||||
}
|
||||
|
||||
void PSF::AddBinary(std::string key, uint64_t value, bool update) {
|
||||
std::vector<u8> data(8);
|
||||
std::memcpy(data.data(), &value, 8);
|
||||
return AddBinary(std::move(key), std::move(data), update);
|
||||
}
|
||||
|
||||
void PSF::AddString(std::string key, std::string value, bool update) {
|
||||
auto [it, index] = FindEntry(key);
|
||||
bool exist = it != entry_list.end();
|
||||
|
|
|
@ -67,6 +67,7 @@ public:
|
|||
std::optional<s32> GetInteger(std::string_view key) const;
|
||||
|
||||
void AddBinary(std::string key, std::vector<u8> value, bool update = false);
|
||||
void AddBinary(std::string key, uint64_t value, bool update = false); // rsv4 format
|
||||
void AddString(std::string key, std::string value, bool update = false);
|
||||
void AddInteger(std::string key, s32 value, bool update = false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue