mirror of https://github.com/mgba-emu/mgba.git
Don't log everything to the log handler when that log level is disabled
This commit is contained in:
parent
4247db81e4
commit
24c826e5b1
|
@ -554,16 +554,17 @@ static void _GBAVLog(struct GBA* gba, enum GBALogLevel level, const char* format
|
|||
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;
|
||||
}
|
||||
|
||||
vprintf(format, args);
|
||||
printf("\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue