all repos — mgba @ 0efe9881610c9935dfd20e85c082b9d03a6ca866

mGBA Game Boy Advance Emulator

Qt: Add log level SWI
Jeffrey Pfau jeffrey@endrift.com
Thu, 06 Nov 2014 00:30:35 -0800
commit

0efe9881610c9935dfd20e85c082b9d03a6ca866

parent

d75042ea38fbffafdd53d2827421ab4470b47737

3 files changed, 20 insertions(+), 0 deletions(-)

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

@@ -16,6 +16,7 @@ connect(m_ui.levelWarn, SIGNAL(toggled(bool)), this, SLOT(setLevelWarn(bool)));

connect(m_ui.levelError, SIGNAL(toggled(bool)), this, SLOT(setLevelError(bool))); connect(m_ui.levelFatal, SIGNAL(toggled(bool)), this, SLOT(setLevelFatal(bool))); connect(m_ui.levelGameError, SIGNAL(toggled(bool)), this, SLOT(setLevelGameError(bool))); + connect(m_ui.levelSWI, SIGNAL(toggled(bool)), this, SLOT(setLevelSWI(bool))); connect(m_ui.clear, SIGNAL(clicked()), this, SLOT(clear())); connect(m_ui.maxLines, SIGNAL(valueChanged(int)), this, SLOT(setMaxLines(int))); m_logLevel = GBA_LOG_WARN | GBA_LOG_ERROR | GBA_LOG_FATAL;

@@ -49,6 +50,7 @@ m_ui.levelWarn->setCheckState(levels & GBA_LOG_WARN ? Qt::Checked : Qt::Unchecked);

m_ui.levelError->setCheckState(levels & GBA_LOG_ERROR ? Qt::Checked : Qt::Unchecked); m_ui.levelFatal->setCheckState(levels & GBA_LOG_FATAL ? Qt::Checked : Qt::Unchecked); m_ui.levelGameError->setCheckState(levels & GBA_LOG_GAME_ERROR ? Qt::Checked : Qt::Unchecked); + m_ui.levelSWI->setCheckState(levels & GBA_LOG_SWI ? Qt::Checked : Qt::Unchecked); } void LogView::setLevelDebug(bool set) {

@@ -107,6 +109,14 @@ clearLevel(GBA_LOG_GAME_ERROR);

} } +void LogView::setLevelSWI(bool set) { + if (set) { + setLevel(GBA_LOG_SWI); + } else { + clearLevel(GBA_LOG_SWI); + } +} + void LogView::setMaxLines(int limit) { m_lineLimit = limit; while (m_lines > m_lineLimit) {

@@ -130,6 +140,8 @@ case GBA_LOG_FATAL:

return tr("FATAL"); case GBA_LOG_GAME_ERROR: return tr("GAME ERROR"); + case GBA_LOG_SWI: + return tr("SWI"); } return QString(); }
M src/platform/qt/LogView.hsrc/platform/qt/LogView.h

@@ -29,6 +29,7 @@ void setLevelWarn(bool);

void setLevelError(bool); void setLevelFatal(bool); void setLevelGameError(bool); + void setLevelSWI(bool); void setMaxLines(int);
M src/platform/qt/LogView.uisrc/platform/qt/LogView.ui

@@ -99,6 +99,13 @@ <bool>false</bool>

</property> </widget> </item> + <item> + <widget class="QCheckBox" name="levelSWI"> + <property name="text"> + <string>SW Interrupt</string> + </property> + </widget> + </item> </layout> </widget> </item>