SRAM things (#970)

* Allow SRAMManager to save to/load from a buffer.

* Don't delete what doesn't exist. Don't create a thread that will do absolutely nothing.

* Update SRAMManager's SecondaryBuffer when loading a savestate.
This commit is contained in:
SuuperW
2021-02-22 19:46:02 -06:00
committed by GitHub
parent 58dd1ec580
commit 94dcc9523e
3 changed files with 58 additions and 19 deletions

View File

@ -23,11 +23,17 @@
namespace NDSCart_SRAMManager
{
extern u32 SecondaryBufferLength;
bool Init();
void DeInit();
void Setup(const char* path, u8* buffer, u32 length);
void RequestFlush();
bool NeedsFlush();
void FlushSecondaryBuffer(u8* dst = NULL, s32 dstLength = 0);
void UpdateBuffer(u8* src, s32 srcLength);
}
#endif // NDSCART_SRAMMANAGER_H