all repos — mgba @ ab70312c0add5900e0a55a8ff9aed7043a3b20f5

mGBA Game Boy Advance Emulator

Qt: Fix OSD
Jeffrey Pfau jeffrey@endrift.com
Fri, 16 Sep 2016 14:59:59 -0700
commit

ab70312c0add5900e0a55a8ff9aed7043a3b20f5

parent

ccf584238b8518a8dfa52a45dcc4d0caac5a2ec6

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

jump to
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -200,6 +200,7 @@ if (!context) {

return; } GameController* controller = static_cast<GameController*>(context->userData); + QString message; #ifdef M_CORE_GBA if (level == mLOG_STUB && category == _mLOG_CAT_GBA_BIOS()) { va_list argc;

@@ -228,6 +229,8 @@ if (slot == 0) {

return; } } + message = QString().vsprintf(format, args); + QMetaObject::invokeMethod(controller, "statusPosted", Q_ARG(const QString&, message)); } if (level == mLOG_FATAL) { mCoreThreadMarkCrashed(controller->thread());

@@ -235,10 +238,7 @@ QMetaObject::invokeMethod(controller, "crashGame", Q_ARG(const QString&, QString().vsprintf(format, args)));

} else if (!(controller->m_logLevels & level)) { return; } - QString message(QString().vsprintf(format, args)); - if (category == _mLOG_CAT_STATUS()) { - QMetaObject::invokeMethod(controller, "statusPosted", Q_ARG(const QString&, message)); - } + message = QString().vsprintf(format, args); QMetaObject::invokeMethod(controller, "postLog", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message)); };