mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
add functionality to import savefiles
This commit is contained in:
@ -588,6 +588,21 @@ void UndoStateLoad()
|
||||
}
|
||||
}
|
||||
|
||||
int ImportSRAM(const char* filename)
|
||||
{
|
||||
FILE* file = fopen(filename, "rb");
|
||||
fseek(file, 0, SEEK_END);
|
||||
u32 size = ftell(file);
|
||||
u8* importData = new u8[size];
|
||||
rewind(file);
|
||||
fread(importData, size, 1, file);
|
||||
fclose(file);
|
||||
|
||||
int diff = NDS::ImportSRAM(importData, size);
|
||||
delete[] importData;
|
||||
return diff;
|
||||
}
|
||||
|
||||
void EnableCheats(bool enable)
|
||||
{
|
||||
CheatsOn = enable;
|
||||
|
Reference in New Issue
Block a user