savefile hack for slot 2, both load from the same SRM file but gb2 doesn't save

This commit is contained in:
radius 2018-01-27 15:24:27 -05:00
parent 3b858fb6af
commit 45e0a75491
1 changed files with 4 additions and 0 deletions

View File

@ -563,7 +563,11 @@ void *retro_get_memory_data(unsigned type)
break;
case RETRO_MEMORY_SAVE_RAM:
if (gb1.cartridge_type->has_battery && gb1.mbc_ram_size != 0)
{
data = gb1.mbc_ram;
/* let's copy the save to gb2 so it can save independently */
memcpy(gb2.mbc_ram, gb1.mbc_ram, gb1.mbc_ram_size);
}
else
data = NULL;
break;