all repos — mgba @ 2b4a4b5ab6586b9cc1699b33ee05de8564d621da

mGBA Game Boy Advance Emulator

DS: Fix memory leak in DSReset
Vicki Pfau vi@endrift.com
Sun, 19 Jul 2020 19:56:15 -0700
commit

2b4a4b5ab6586b9cc1699b33ee05de8564d621da

parent

b55c041ec184e68804f893b833521e6ee0c1061a

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/ds/ds.csrc/ds/ds.c

@@ -287,7 +287,7 @@ cpu->gprs[ARM_SP] = DS7_SP_BASE;

struct DS* ds = (struct DS*) cpu->master; mTimingClear(&ds->ds7.timing); - CircleBufferInit(&ds->ds7.fifo, 64); + CircleBufferClear(&ds->ds7.fifo); DSMemoryReset(ds); DSDMAReset(&ds->ds7); DSAudioReset(&ds->audio);

@@ -345,7 +345,7 @@ cpu->gprs[ARM_SP] = DS9_SP_BASE;

struct DS* ds = (struct DS*) cpu->master; mTimingClear(&ds->ds9.timing); - CircleBufferInit(&ds->ds9.fifo, 64); + CircleBufferClear(&ds->ds9.fifo); DSVideoReset(&ds->video); DSGXReset(&ds->gx); DSDMAReset(&ds->ds9);