From 968069ff5e9258ed6ceb1e033a6ebf84bd63cfa0 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Thu, 8 Jan 2015 23:46:17 -0800 Subject: [PATCH] GBA: Fix logging moving events --- src/gba/gba.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gba/gba.c b/src/gba/gba.c index 111276452..583bf59a5 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -613,13 +613,17 @@ static void _GBAVLog(struct GBA* gba, enum GBALogLevel level, const char* format if (threadContext) { logLevel = threadContext->logLevel; + gba = threadContext->gba; } if (!(level & logLevel) && level != GBA_LOG_FATAL) { return; } - gba->cpu->nextEvent = 0; + if (level == GBA_LOG_FATAL && gba) { + gba->cpu->nextEvent = 0; + } + if (threadContext) { if (level == GBA_LOG_FATAL) { MutexLock(&threadContext->stateMutex);