GB Core: Fix exported size information

This commit is contained in:
Vicki Pfau 2023-09-10 22:34:16 -07:00
parent b46278b3ed
commit 022e009a75
1 changed files with 2 additions and 0 deletions

View File

@ -686,8 +686,10 @@ static void _GBCoreReset(struct mCore* core) {
size_t i;
for (i = 0; i < sizeof(gbcore->memoryBlocks) / sizeof(*gbcore->memoryBlocks); ++i) {
if (gbcore->memoryBlocks[i].id == GB_REGION_CART_BANK0) {
gbcore->memoryBlocks[i].size = gb->memory.romSize;
gbcore->memoryBlocks[i].maxSegment = gb->memory.romSize / GB_SIZE_CART_BANK0;
} else if (gbcore->memoryBlocks[i].id == GB_REGION_EXTERNAL_RAM) {
gbcore->memoryBlocks[i].size = gb->sramSize;
gbcore->memoryBlocks[i].maxSegment = gb->sramSize / GB_SIZE_EXTERNAL_RAM;
} else {
continue;