mirror of https://github.com/mgba-emu/mgba.git
GB Core: Fix exported size information
This commit is contained in:
parent
c5dc97a432
commit
0fb8b782be
|
@ -644,8 +644,10 @@ static void _GBCoreReset(struct mCore* core) {
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < sizeof(gbcore->memoryBlocks) / sizeof(*gbcore->memoryBlocks); ++i) {
|
for (i = 0; i < sizeof(gbcore->memoryBlocks) / sizeof(*gbcore->memoryBlocks); ++i) {
|
||||||
if (gbcore->memoryBlocks[i].id == GB_REGION_CART_BANK0) {
|
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;
|
gbcore->memoryBlocks[i].maxSegment = gb->memory.romSize / GB_SIZE_CART_BANK0;
|
||||||
} else if (gbcore->memoryBlocks[i].id == GB_REGION_EXTERNAL_RAM) {
|
} 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;
|
gbcore->memoryBlocks[i].maxSegment = gb->sramSize / GB_SIZE_EXTERNAL_RAM;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue