mirror of
https://github.com/libretro/mgba.git
synced 2025-03-01 20:15:29 +00:00
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…
x
Reference in New Issue
Block a user