GBA Memory: Call crash callbacks regardless of if hard crash is enabled

This commit is contained in:
Vicki Pfau 2017-07-08 17:29:03 -07:00
parent c856897b1e
commit b6c0d5307f
2 changed files with 7 additions and 4 deletions

View File

@ -179,6 +179,7 @@ Misc:
- Qt: Move shader settings into main settings window - Qt: Move shader settings into main settings window
- GB Serialize: Add MBC state serialization - GB Serialize: Add MBC state serialization
- Qt: Dismiss game crashing/failing dialogs when a new game loads - 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) 0.6 beta 1: (2017-06-29)
- Initial beta for 0.6 - Initial beta for 0.6

View File

@ -297,10 +297,8 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) {
memory->activeRegion = -1; memory->activeRegion = -1;
cpu->memory.activeRegion = _deadbeef; cpu->memory.activeRegion = _deadbeef;
cpu->memory.activeMask = 0; cpu->memory.activeMask = 0;
if (gba->yankedRomSize || !gba->hardCrash) {
mLOG(GBA_MEM, GAME_ERROR, "Jumped to invalid address: %08X", address); if (!gba->yankedRomSize && mCoreCallbacksListSize(&gba->coreCallbacks)) {
} else if (mCoreCallbacksListSize(&gba->coreCallbacks)) {
mLOG(GBA_MEM, GAME_ERROR, "Jumped to invalid address: %08X", address);
size_t c; size_t c;
for (c = 0; c < mCoreCallbacksListSize(&gba->coreCallbacks); ++c) { for (c = 0; c < mCoreCallbacksListSize(&gba->coreCallbacks); ++c) {
struct mCoreCallbacks* callbacks = mCoreCallbacksListGetPointer(&gba->coreCallbacks, c); struct mCoreCallbacks* callbacks = mCoreCallbacksListGetPointer(&gba->coreCallbacks, c);
@ -308,6 +306,10 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) {
callbacks->coreCrashed(callbacks->context); callbacks->coreCrashed(callbacks->context);
} }
} }
}
if (gba->yankedRomSize || !gba->hardCrash) {
mLOG(GBA_MEM, GAME_ERROR, "Jumped to invalid address: %08X", address);
} else { } else {
mLOG(GBA_MEM, FATAL, "Jumped to invalid address: %08X", address); mLOG(GBA_MEM, FATAL, "Jumped to invalid address: %08X", address);
} }