diff options
author | RSDuck <rsduck@users.noreply.github.com> | 2020-09-11 03:08:06 +0200 |
---|---|---|
committer | RSDuck <rsduck@users.noreply.github.com> | 2020-09-11 03:08:06 +0200 |
commit | f2fa52f26ceb1f385d58e57ab26ca7d5349978d2 (patch) | |
tree | cd5a01d7ee45b118bad3fcf8de9e9237c368686a /src/NDSCart.cpp | |
parent | 00e2ec3faf43b1fa6ad3def0e97828083244a47a (diff) |
add functionality to import savefiles
Diffstat (limited to 'src/NDSCart.cpp')
-rw-r--r-- | src/NDSCart.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp index 6abfc7c..5710213 100644 --- a/src/NDSCart.cpp +++ b/src/NDSCart.cpp @@ -1034,6 +1034,12 @@ void RelocateSave(const char* path, bool write) NDSCart_SRAM::RelocateSave(path, write); } +int ImportSRAM(const u8* data, u32 length) +{ + memcpy(NDSCart_SRAM::SRAM, data, std::min(length, NDSCart_SRAM::SRAMLength)); + return length - NDSCart_SRAM::SRAMLength; +} + void ResetCart() { // CHECKME: what if there is a transfer in progress? |