mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix OSD
This commit is contained in:
parent
ccf584238b
commit
ab70312c0a
|
@ -200,6 +200,7 @@ GameController::GameController(QObject* parent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GameController* controller = static_cast<GameController*>(context->userData);
|
GameController* controller = static_cast<GameController*>(context->userData);
|
||||||
|
QString message;
|
||||||
#ifdef M_CORE_GBA
|
#ifdef M_CORE_GBA
|
||||||
if (level == mLOG_STUB && category == _mLOG_CAT_GBA_BIOS()) {
|
if (level == mLOG_STUB && category == _mLOG_CAT_GBA_BIOS()) {
|
||||||
va_list argc;
|
va_list argc;
|
||||||
|
@ -228,6 +229,8 @@ GameController::GameController(QObject* parent)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
message = QString().vsprintf(format, args);
|
||||||
|
QMetaObject::invokeMethod(controller, "statusPosted", Q_ARG(const QString&, message));
|
||||||
}
|
}
|
||||||
if (level == mLOG_FATAL) {
|
if (level == mLOG_FATAL) {
|
||||||
mCoreThreadMarkCrashed(controller->thread());
|
mCoreThreadMarkCrashed(controller->thread());
|
||||||
|
@ -235,10 +238,7 @@ GameController::GameController(QObject* parent)
|
||||||
} else if (!(controller->m_logLevels & level)) {
|
} else if (!(controller->m_logLevels & level)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString message(QString().vsprintf(format, args));
|
message = QString().vsprintf(format, args);
|
||||||
if (category == _mLOG_CAT_STATUS()) {
|
|
||||||
QMetaObject::invokeMethod(controller, "statusPosted", Q_ARG(const QString&, message));
|
|
||||||
}
|
|
||||||
QMetaObject::invokeMethod(controller, "postLog", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message));
|
QMetaObject::invokeMethod(controller, "postLog", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue