mirror of
https://github.com/libretro/mgba.git
synced 2024-11-24 00:20:05 +00:00
GBA BIOS: Crash on BIOS misuse if hardCrash is enabled
This commit is contained in:
parent
c9145e18d7
commit
4b40c5cd1a
@ -623,6 +623,10 @@ static void _mCoreLog(struct mLogger* logger, int category, enum mLogLevel level
|
||||
printf("%s: ", mLogCategoryName(category));
|
||||
vprintf(format, args);
|
||||
printf("\n");
|
||||
struct mCoreThread* thread = mCoreThreadGet();
|
||||
if (thread && level == mLOG_FATAL) {
|
||||
mCoreThreadMarkCrashed(thread);
|
||||
}
|
||||
}
|
||||
|
||||
struct mLogger* mCoreThreadLogger(void) {
|
||||
|
@ -531,7 +531,11 @@ static void _unLz77(struct GBA* gba, int width) {
|
||||
bytes = (block >> 12) + 3;
|
||||
while (bytes--) {
|
||||
if (!remaining) {
|
||||
mLOG(GBA_BIOS, GAME_ERROR, "Improperly compressed LZ77 data. Real BIOS would hang.");
|
||||
if (gba->hardCrash) {
|
||||
mLOG(GBA_BIOS, FATAL, "Improperly compressed LZ77 data. Real BIOS would hang.");
|
||||
} else {
|
||||
mLOG(GBA_BIOS, GAME_ERROR, "Improperly compressed LZ77 data. Real BIOS would hang.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
--remaining;
|
||||
|
@ -13,7 +13,7 @@ LogController::LogController(int levels, QObject* parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
mLogFilterInit(&m_filter);
|
||||
mLogFilterSet(&m_filter, "gba.bios", mLOG_STUB);
|
||||
mLogFilterSet(&m_filter, "gba.bios", mLOG_STUB | mLOG_FATAL);
|
||||
mLogFilterSet(&m_filter, "core.status", mLOG_ALL & ~mLOG_DEBUG);
|
||||
m_filter.defaultLevels = levels;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user