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
2 files changed,
7 insertions(+),
4 deletions(-)
M
CHANGES
→
CHANGES
@@ -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.c
→
src/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); }