all repos — mgba @ e902a253946efa4abcd2c8c930a7733998c5f337

mGBA Game Boy Advance Emulator

3DS: Fix crash with libctru 2.0 when exiting
Vicki Pfau vi@endrift.com
Sat, 08 Aug 2020 04:33:57 -0700
commit

e902a253946efa4abcd2c8c930a7733998c5f337

parent

214febf7278033bf8642311755423212fa0a21c0

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

jump to
M CHANGESCHANGES

@@ -26,6 +26,7 @@ - GBA Video: Fix Hblank timing

- SM83: Emulate HALT bug Other fixes: - 3DS: Redo video sync to be more precise + - 3DS: Fix crash with libctru 2.0 when exiting - All: Improve export headers (fixes mgba.io/i/1738) - Core: Ensure ELF regions can be written before trying - Debugger: Don't skip undefined instructions when debugger attached
M src/platform/3ds/main.csrc/platform/3ds/main.c

@@ -107,7 +107,6 @@ static C3D_Tex upscaleBufferTex;

static bool interframeBlending = false; static bool sgbCrop = false; -static aptHookCookie cookie; static bool core2; static bool _initGpu(void) {

@@ -188,18 +187,6 @@

camExit(); ndspExit(); ptmuExit(); -} - -static void _aptHook(APT_HookType hook, void* user) { - UNUSED(user); - switch (hook) { - case APTHOOK_ONEXIT: - _cleanup(); - exit(0); - break; - default: - break; - } } static void _map3DSKey(struct mInputMap* map, int ctrKey, enum GBAKey key) {

@@ -825,8 +812,6 @@ camera.d.requestImage = _requestImage;

camera.buffer = NULL; camera.bufferSize = 0; camera.cam = SELECT_IN1; - - aptHook(&cookie, _aptHook, 0); ptmuInit(); camInit();