mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-27 04:08:37 +01:00
Respect the IgnoreBadMemAccess ini option (exit on bad access if set).
Fix ini save/load on SDL build.
This commit is contained in:
1 parent
63beeb5030
commit
baebaaddf9
5 files changed
+32
-15
No files matched your search
@@ -19,7 +19,8 @@
|
||||
#include "Atomic.h"
|
||||
|
||||
#include "MemMap.h"
|
||||
// #include "../Core.h"
|
||||
#include "Config.h"
|
||||
|
||||
#include "MIPS/MIPS.h"
|
||||
|
||||
// TODO: Fix this
|
||||
@@ -82,6 +83,10 @@ inline void ReadFromHardware(T &var, const u32 address)
|
||||
else
|
||||
{
|
||||
WARN_LOG(MEMMAP, "ReadFromHardware: Invalid address %08x PC %08x LR %08x", address, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||
if (!g_Config.bIgnoreBadMemAccess) {
|
||||
// TODO: Not sure what the best way to crash is...
|
||||
exit(0);
|
||||
}
|
||||
var = 0;
|
||||
}
|
||||
}
|
||||
@@ -106,6 +111,10 @@ inline void WriteToHardware(u32 address, const T data)
|
||||
else
|
||||
{
|
||||
WARN_LOG(MEMMAP, "WriteToHardware: Invalid address %08x PC %08x LR %08x", address, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||
if (!g_Config.bIgnoreBadMemAccess) {
|
||||
// TODO: Not sure what the best way to crash is...
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user