mirror of https://github.com/mgba-emu/mgba.git
3DS: Fix crash with libctru 2.0 when exiting
This commit is contained in:
parent
214febf727
commit
e902a25394
1
CHANGES
1
CHANGES
|
@ -26,6 +26,7 @@ Emulation fixes:
|
||||||
- SM83: Emulate HALT bug
|
- SM83: Emulate HALT bug
|
||||||
Other fixes:
|
Other fixes:
|
||||||
- 3DS: Redo video sync to be more precise
|
- 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)
|
- All: Improve export headers (fixes mgba.io/i/1738)
|
||||||
- Core: Ensure ELF regions can be written before trying
|
- Core: Ensure ELF regions can be written before trying
|
||||||
- Debugger: Don't skip undefined instructions when debugger attached
|
- Debugger: Don't skip undefined instructions when debugger attached
|
||||||
|
|
|
@ -107,7 +107,6 @@ static C3D_Tex upscaleBufferTex;
|
||||||
static bool interframeBlending = false;
|
static bool interframeBlending = false;
|
||||||
static bool sgbCrop = false;
|
static bool sgbCrop = false;
|
||||||
|
|
||||||
static aptHookCookie cookie;
|
|
||||||
static bool core2;
|
static bool core2;
|
||||||
|
|
||||||
static bool _initGpu(void) {
|
static bool _initGpu(void) {
|
||||||
|
@ -190,18 +189,6 @@ static void _cleanup(void) {
|
||||||
ptmuExit();
|
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) {
|
static void _map3DSKey(struct mInputMap* map, int ctrKey, enum GBAKey key) {
|
||||||
mInputBindKey(map, _3DS_INPUT, __builtin_ctz(ctrKey), key);
|
mInputBindKey(map, _3DS_INPUT, __builtin_ctz(ctrKey), key);
|
||||||
}
|
}
|
||||||
|
@ -826,8 +813,6 @@ int main() {
|
||||||
camera.bufferSize = 0;
|
camera.bufferSize = 0;
|
||||||
camera.cam = SELECT_IN1;
|
camera.cam = SELECT_IN1;
|
||||||
|
|
||||||
aptHook(&cookie, _aptHook, 0);
|
|
||||||
|
|
||||||
ptmuInit();
|
ptmuInit();
|
||||||
camInit();
|
camInit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue