diff options
Diffstat (limited to 'src/NDSCart.cpp')
-rw-r--r-- | src/NDSCart.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp index 34e64df..7856bc9 100644 --- a/src/NDSCart.cpp +++ b/src/NDSCart.cpp @@ -24,6 +24,7 @@ #include "CRC32.h" #include "melon_fopen.h" +#include "Platform.h" namespace NDSCart_SRAM @@ -117,7 +118,7 @@ void LoadSave(const char* path, u32 type) strncpy(SRAMPath, path, 1023); SRAMPath[1023] = '\0'; - FILE* f = melon_fopen(path, "rb"); + FILE* f = Platform::OpenFile(path, "rb"); if (f) { fseek(f, 0, SEEK_END); @@ -177,7 +178,7 @@ void RelocateSave(const char* path, bool write) strncpy(SRAMPath, path, 1023); SRAMPath[1023] = '\0'; - FILE* f = melon_fopen(path, "wb"); + FILE* f = Platform::OpenFile(path, "wb"); if (!f) { printf("NDSCart_SRAM::RelocateSave: failed to create new file. fuck\n"); @@ -444,7 +445,7 @@ void Write(u8 val, u32 hold) if (islast && (CurCmd == 0x02 || CurCmd == 0x0A) && (SRAMLength > 0)) { - FILE* f = melon_fopen(SRAMPath, "wb"); + FILE* f = Platform::OpenFile(SRAMPath, "wb"); if (f) { fwrite(SRAM, SRAMLength, 1, f); @@ -872,7 +873,7 @@ bool LoadROM(const char* path, const char* sram, bool direct) // TODO: streaming mode? for really big ROMs or systems with limited RAM // for now we're lazy - FILE* f = melon_fopen(path, "rb"); + FILE* f = Platform::OpenFile(path, "rb"); if (!f) { return false; |