make recent ROM list work

This commit is contained in:
Arisotura
2022-01-04 00:53:26 +01:00
parent 52a9abde6f
commit 1c65239600
5 changed files with 52 additions and 44 deletions

View File

@ -487,11 +487,7 @@ void CartGame::SRAMWrite_FLASH(u32 addr, u8 val)
u32 start_addr = addr + 0x10000 * SRAMFlashState.bank;
memset((u8*)&SRAM[start_addr], 0xFF, 0x1000);
/*if (SRAMFile)
{
fseek(SRAMFile, start_addr, SEEK_SET);
fwrite((u8*)&SRAM[start_addr], 1, 0x1000, SRAMFile);
}*/
Platform::WriteGBASave(SRAM, SRAMLength, start_addr, 0x1000);
}
SRAMFlashState.state = 0;
SRAMFlashState.cmd = 0;
@ -549,11 +545,8 @@ void CartGame::SRAMWrite_SRAM(u32 addr, u8 val)
{
*(u8*)&SRAM[addr] = val;
/*if (SRAMFile)
{
fseek(SRAMFile, addr, SEEK_SET);
fwrite((u8*)&SRAM[addr], 1, 1, SRAMFile);
}*/
// TODO: optimize this!!
Platform::WriteGBASave(SRAM, SRAMLength, addr, 1);
}
}