diff --git a/src/platform/3ds/3ds-memory.c b/src/platform/3ds/3ds-memory.c index fd736fb76..fcaca953b 100644 --- a/src/platform/3ds/3ds-memory.c +++ b/src/platform/3ds/3ds-memory.c @@ -10,10 +10,10 @@ #include <3ds.h> void* anonymousMemoryMap(size_t size) { - return linearAlloc(size); + return malloc(size); } void mappedMemoryFree(void* memory, size_t size) { UNUSED(size); - linearFree(memory); + free(memory); } diff --git a/src/platform/3ds/main.c b/src/platform/3ds/main.c index 7d2928216..37f1984fe 100644 --- a/src/platform/3ds/main.c +++ b/src/platform/3ds/main.c @@ -65,7 +65,7 @@ static void _setup(struct GBAGUIRunner* runner) { } GBAVideoSoftwareRendererCreate(&renderer); - renderer.outputBuffer = anonymousMemoryMap(256 * VIDEO_VERTICAL_PIXELS * 2); + renderer.outputBuffer = linearAlloc(256 * VIDEO_VERTICAL_PIXELS * 2); renderer.outputBufferStride = 256; runner->context.renderer = &renderer.d; @@ -259,7 +259,7 @@ int main() { GBAGUIDeinit(&runner); cleanup: - mappedMemoryFree(renderer.outputBuffer, 0); + linearFree(renderer.outputBuffer); if (logFile) { logFile->close(logFile);