mirror of https://github.com/mgba-emu/mgba.git
Core: Get thread log level working again
This commit is contained in:
parent
6eefdfff03
commit
ab44084236
|
@ -164,6 +164,7 @@ static THREAD_ENTRY _mCoreThreadRun(void* context) {
|
|||
bool mCoreThreadStart(struct mCoreThread* threadContext) {
|
||||
threadContext->state = THREAD_INITIALIZED;
|
||||
threadContext->logger.p = threadContext;
|
||||
threadContext->logLevel = threadContext->core->opts.logLevel;
|
||||
|
||||
if (!threadContext->sync.fpsTarget) {
|
||||
threadContext->sync.fpsTarget = _defaultFPSTarget;
|
||||
|
@ -408,6 +409,10 @@ struct mCoreThread* mCoreThreadGet(void) {
|
|||
|
||||
static void _mCoreLog(struct mLogger* logger, int category, enum mLogLevel level, const char* format, va_list args) {
|
||||
UNUSED(logger);
|
||||
struct mCoreThread* thread = mCoreThreadGet();
|
||||
if (thread && !(thread->logLevel & level)) {
|
||||
return;
|
||||
}
|
||||
printf("%s: ", mLogCategoryName(category));
|
||||
vprintf(format, args);
|
||||
printf("\n");
|
||||
|
|
|
@ -81,13 +81,6 @@ struct DebuggerEntryInfo {
|
|||
};
|
||||
};
|
||||
|
||||
enum DebuggerLogLevel {
|
||||
DEBUGGER_LOG_DEBUG = 0x01,
|
||||
DEBUGGER_LOG_INFO = 0x02,
|
||||
DEBUGGER_LOG_WARN = 0x04,
|
||||
DEBUGGER_LOG_ERROR = 0x08
|
||||
};
|
||||
|
||||
struct Debugger {
|
||||
struct mCPUComponent d;
|
||||
enum DebuggerState state;
|
||||
|
|
Loading…
Reference in New Issue