3DS: Fix crash with libctru 2.0 when exiting
Vicki Pfau vi@endrift.com
Sat, 08 Aug 2020 04:33:57 -0700
2 files changed,
1 insertions(+),
15 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.c
→
src/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();