all repos — mgba @ 24c826e5b109faff843179c3ee41fc8a5f21eb2b

mGBA Game Boy Advance Emulator

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
commit

24c826e5b109faff843179c3ee41fc8a5f21eb2b

parent

4247db81e43fb35526036b5538111a8dc3eb2606

1 files changed, 5 insertions(+), 4 deletions(-)

jump to
M src/gba/gba.csrc/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; }