DolphinQt: Don't update debug widgets when hidden

Saves on CPU usage when pausing/unpausing with the debugger disabled.
This is especially important when using frame advance rapidly.
This commit is contained in:
JosJuice
2019-07-06 10:50:11 +02:00
parent 0a7395bfba
commit 92a655c8b9
14 changed files with 108 additions and 32 deletions

View File

@ -57,8 +57,6 @@ JITWidget::JITWidget(QWidget* parent) : QDockWidget(parent)
#else
m_disassembler = GetNewDisassembler("UNK");
#endif
Update();
}
JITWidget::~JITWidget()
@ -126,6 +124,9 @@ void JITWidget::Compare(u32 address)
void JITWidget::Update()
{
if (!isVisible())
return;
if (!m_address)
{
m_ppc_asm_widget->setHtml(QStringLiteral("<i>%1</i>").arg(tr("(ppc)")));
@ -208,3 +209,8 @@ void JITWidget::closeEvent(QCloseEvent*)
{
Settings::Instance().SetJITVisible(false);
}
void JITWidget::showEvent(QShowEvent* event)
{
Update();
}