Add CMemoryCardDriver::ExportPersistentOptions

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-11 19:56:45 +03:00
parent 46335059ec
commit 93ef9574e1
No known key found for this signature in database
GPG Key ID: E224F951761145F8
2 changed files with 10 additions and 1 deletions

View File

@ -14,6 +14,7 @@ public:
CSystemOptions();
explicit CSystemOptions(CInputStream&);
~CSystemOptions();
void PutTo(COutputStream&);
void SetHasFusion(bool v);
bool GetHasFusion() const { return xd0_28_fusionSuitActive; }

View File

@ -747,7 +747,15 @@ void CMemoryCardDriver::ImportPersistentOptions() {
gpGameState->ImportPersistentOptions(opts);
}
void CMemoryCardDriver::ExportPersistentOptions() {}
void CMemoryCardDriver::ExportPersistentOptions() {
u8* data = x30_systemData.data();
CMemoryInStream r(data, x30_systemData.capacity());
CSystemOptions opts(r);
gpGameState->ExportPersistentOptions(opts);
CMemoryStreamOut w(data, x30_systemData.capacity());
opts.PutTo(w);
}
// SSaveHeader::SSaveHeader(int)