aboutsummaryrefslogtreecommitdiff
path: root/src/NDSCart.cpp
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2018-10-24 00:24:36 +0200
committerStapleButter <thetotalworm@gmail.com>2018-10-24 00:24:36 +0200
commit8b4ba2d8b9833fec88df8a3549af30b3ec704469 (patch)
tree747b85790f771ed8f750f0291553eb3ba9216547 /src/NDSCart.cpp
parent1edf2aed3b4c0e02d5a094d04d337578d4f967b9 (diff)
separate SRAM setting coded, I guess
Diffstat (limited to 'src/NDSCart.cpp')
-rw-r--r--src/NDSCart.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp
index 44d6ca9..03dfe4c 100644
--- a/src/NDSCart.cpp
+++ b/src/NDSCart.cpp
@@ -196,8 +196,14 @@ void LoadSave(const char* path)
StatusReg = 0x00;
}
-void RelocateSave(const char* path)
+void RelocateSave(const char* path, bool write)
{
+ if (!write)
+ {
+ LoadSave(path); // lazy
+ return;
+ }
+
strncpy(SRAMPath, path, 1023);
SRAMPath[1023] = '\0';
@@ -1143,10 +1149,10 @@ bool LoadROM(const char* path, const char* sram, bool direct)
return true;
}
-void RelocateSave(const char* path)
+void RelocateSave(const char* path, bool write)
{
// herp derp
- NDSCart_SRAM::RelocateSave(path);
+ NDSCart_SRAM::RelocateSave(path, write);
}
void ReadROM(u32 addr, u32 len, u32 offset)