3DS: Fix crash with libctru 2.0 when exiting

This commit is contained in:
Vicki Pfau 2020-08-08 04:33:57 -07:00
parent 214febf727
commit e902a25394
2 changed files with 1 additions and 15 deletions

View File

@ -26,6 +26,7 @@ Emulation fixes:
- 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

View File

@ -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) {
@ -190,18 +189,6 @@ static void _cleanup(void) {
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) {
mInputBindKey(map, _3DS_INPUT, __builtin_ctz(ctrKey), key);
}
@ -826,8 +813,6 @@ int main() {
camera.bufferSize = 0;
camera.cam = SELECT_IN1;
aptHook(&cookie, _aptHook, 0);
ptmuInit();
camInit();