aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/NDSCart.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp
index 5710213..077bf48 100644
--- a/src/NDSCart.cpp
+++ b/src/NDSCart.cpp
@@ -1037,6 +1037,13 @@ void RelocateSave(const char* path, bool write)
int ImportSRAM(const u8* data, u32 length)
{
memcpy(NDSCart_SRAM::SRAM, data, std::min(length, NDSCart_SRAM::SRAMLength));
+ FILE* f = Platform::OpenFile(NDSCart_SRAM::SRAMPath, "wb");
+ if (f)
+ {
+ fwrite(NDSCart_SRAM::SRAM, NDSCart_SRAM::SRAMLength, 1, f);
+ fclose(f);
+ }
+
return length - NDSCart_SRAM::SRAMLength;
}