mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Add a NOOP state to reduce logspam after error
This commit is contained in:
1 parent
52a684644d
commit
f5a7661c51
5 files changed
+23
-14
No files matched your search
@@ -105,8 +105,10 @@ PointerWrapSection PointerWrap::Section(const char *title, int minVer, int ver)
|
||||
if (!firstBadSectionTitle_) {
|
||||
firstBadSectionTitle_ = title;
|
||||
}
|
||||
WARN_LOG(SAVESTATE, "Savestate failure: wrong version %d found for section '%s'", foundVersion, title);
|
||||
SetError(ERROR_FAILURE);
|
||||
if (mode != MODE_NOOP) {
|
||||
WARN_LOG(SAVESTATE, "Savestate failure: wrong version %d found for section '%s'", foundVersion, title);
|
||||
SetError(ERROR_FAILURE);
|
||||
}
|
||||
return PointerWrapSection(*this, -1, title);
|
||||
}
|
||||
return PointerWrapSection(*this, foundVersion, title);
|
||||
@@ -117,8 +119,9 @@ void PointerWrap::SetError(Error error_) {
|
||||
error = error_;
|
||||
}
|
||||
if (error > ERROR_WARNING) {
|
||||
// For the rest of this run, just measure.
|
||||
mode = PointerWrap::MODE_MEASURE;
|
||||
// For the rest of this run, do nothing, to avoid running off the end of memory or something,
|
||||
// and also not logspam like MEASURE will do in an error case.
|
||||
mode = PointerWrap::MODE_NOOP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user