Don't log everything to the log handler when that log level is disabled
Jeffrey Pfau jeffrey@endrift.com
Sun, 12 Oct 2014 19:43:19 -0700
1 files changed,
5 insertions(+),
4 deletions(-)
jump to
M
src/gba/gba.c
→
src/gba/gba.c
@@ -554,13 +554,14 @@ if (threadContext) {
if (!gba) { gba = threadContext->gba; } - if (threadContext->logHandler) { - threadContext->logHandler(threadContext, level, format, args); - return; - } } if (gba && !(level & gba->logLevel) && level != GBA_LOG_FATAL) { + return; + } + + if (threadContext && threadContext->logHandler) { + threadContext->logHandler(threadContext, level, format, args); return; }