all repos — mgba @ b6c0d5307f4690b796dd11e13900dcebfacdfcc9

mGBA Game Boy Advance Emulator

GBA Memory: Call crash callbacks regardless of if hard crash is enabled
Vicki Pfau vi@endrift.com
Sat, 08 Jul 2017 17:29:03 -0700
commit

b6c0d5307f4690b796dd11e13900dcebfacdfcc9

parent

c856897b1e2e23cac72fe1d65912b2ac1caf5893

2 files changed, 7 insertions(+), 4 deletions(-)

jump to
M CHANGESCHANGES

@@ -179,6 +179,7 @@ - PSP2: Update toolchain to use vita.cmake

- Qt: Move shader settings into main settings window - GB Serialize: Add MBC state serialization - Qt: Dismiss game crashing/failing dialogs when a new game loads + - GBA Memory: Call crash callbacks regardless of if hard crash is enabled 0.6 beta 1: (2017-06-29) - Initial beta for 0.6
M src/gba/memory.csrc/gba/memory.c

@@ -297,10 +297,8 @@ default:

memory->activeRegion = -1; cpu->memory.activeRegion = _deadbeef; cpu->memory.activeMask = 0; - if (gba->yankedRomSize || !gba->hardCrash) { - mLOG(GBA_MEM, GAME_ERROR, "Jumped to invalid address: %08X", address); - } else if (mCoreCallbacksListSize(&gba->coreCallbacks)) { - mLOG(GBA_MEM, GAME_ERROR, "Jumped to invalid address: %08X", address); + + if (!gba->yankedRomSize && mCoreCallbacksListSize(&gba->coreCallbacks)) { size_t c; for (c = 0; c < mCoreCallbacksListSize(&gba->coreCallbacks); ++c) { struct mCoreCallbacks* callbacks = mCoreCallbacksListGetPointer(&gba->coreCallbacks, c);

@@ -308,6 +306,10 @@ if (callbacks->coreCrashed) {

callbacks->coreCrashed(callbacks->context); } } + } + + if (gba->yankedRomSize || !gba->hardCrash) { + mLOG(GBA_MEM, GAME_ERROR, "Jumped to invalid address: %08X", address); } else { mLOG(GBA_MEM, FATAL, "Jumped to invalid address: %08X", address); }