all repos — mgba @ 9a5546867b1d602a1d22bcfacfa64720e0691cc6

mGBA Game Boy Advance Emulator

3DS: Fix memory leak
Vicki Pfau vi@endrift.com
Sun, 28 Mar 2021 18:26:40 -0700
commit

9a5546867b1d602a1d22bcfacfa64720e0691cc6

parent

10764f81f2dda8883b991db6fa38d9e9e434f166

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

jump to
M src/platform/3ds/main.csrc/platform/3ds/main.c

@@ -301,7 +301,7 @@ _map3DSKey(&runner->core->inputMap, KEY_RIGHT, GBA_KEY_RIGHT);

_map3DSKey(&runner->core->inputMap, KEY_L, GBA_KEY_L); _map3DSKey(&runner->core->inputMap, KEY_R, GBA_KEY_R); - outputBuffer = linearMemAlign(256 * 224 * sizeof(color_t), 0x80); + memset(outputBuffer, 0, 256 * 224 * sizeof(color_t)); runner->core->setVideoBuffer(runner->core, outputBuffer, 256); unsigned mode;

@@ -882,6 +882,7 @@ if (!font) {

_cleanup(); return 1; } + outputBuffer = linearMemAlign(256 * 224 * sizeof(color_t), 0x80); struct mGUIRunner runner = { .params = {