diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-03-28 11:35:13 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-04-08 16:23:23 -0700 |
| commit | eb92d6f0a8c930692de64bd41c5ddee403771023 (patch) | |
| tree | 72308538d75942206b415a0b9fc50b4cc7d09533 /Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | |
| parent | db0cd82326a13febb1104efbfd9af9ad5ac2c494 (diff) | |
Core::GetState: Avoid Global System Accessor
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp index 5cbd75faac..9574a985b7 100644 --- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp +++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp @@ -531,7 +531,7 @@ void BranchWatchDialog::hideEvent(QHideEvent* event) void BranchWatchDialog::showEvent(QShowEvent* event) { - if (TimerCondition(m_branch_watch, Core::GetState())) + if (TimerCondition(m_branch_watch, Core::GetState(m_system))) m_timer->start(BRANCH_WATCH_TOOL_TIMER_DELAY_MS); QDialog::showEvent(event); } @@ -544,7 +544,7 @@ void BranchWatchDialog::OnStartPause(bool checked) m_btn_start_pause->setText(tr("Pause Branch Watch")); // Restart the timer if the situation calls for it, but always turn off single-shot. m_timer->setSingleShot(false); - if (Core::GetState() > Core::State::Paused) + if (Core::GetState(m_system) > Core::State::Paused) m_timer->start(BRANCH_WATCH_TOOL_TIMER_DELAY_MS); } else @@ -552,7 +552,7 @@ void BranchWatchDialog::OnStartPause(bool checked) m_branch_watch.Pause(); m_btn_start_pause->setText(tr("Start Branch Watch")); // Schedule one last update in the future in case Branch Watch is in the middle of a hit. - if (Core::GetState() > Core::State::Paused) + if (Core::GetState(m_system) > Core::State::Paused) m_timer->setInterval(BRANCH_WATCH_TOOL_TIMER_PAUSE_ONESHOT_MS); m_timer->setSingleShot(true); } @@ -645,7 +645,7 @@ void BranchWatchDialog::OnCodePathNotTaken() void BranchWatchDialog::OnBranchWasOverwritten() { - if (Core::GetState() == Core::State::Uninitialized) + if (Core::GetState(m_system) == Core::State::Uninitialized) { ModalMessageBox::warning(this, tr("Error"), tr("Core is uninitialized.")); return; @@ -660,7 +660,7 @@ void BranchWatchDialog::OnBranchWasOverwritten() void BranchWatchDialog::OnBranchNotOverwritten() { - if (Core::GetState() == Core::State::Uninitialized) + if (Core::GetState(m_system) == Core::State::Uninitialized) { ModalMessageBox::warning(this, tr("Error"), tr("Core is uninitialized.")); return; @@ -810,7 +810,7 @@ void BranchWatchDialog::OnTableContextMenu(const QPoint& pos) case Column::Origin: { QAction* const action = menu->addAction(tr("Insert &NOP")); - if (Core::GetState() != Core::State::Uninitialized) + if (Core::GetState(m_system) != Core::State::Uninitialized) connect(action, &QAction::triggered, [this, index_list]() { OnTableSetNOP(std::move(index_list)); }); else @@ -824,7 +824,7 @@ void BranchWatchDialog::OnTableContextMenu(const QPoint& pos) { QAction* const action = menu->addAction(tr("Insert &BLR")); const bool enable_action = - Core::GetState() != Core::State::Uninitialized && + Core::GetState(m_system) != Core::State::Uninitialized && std::all_of(index_list.begin(), index_list.end(), [this](const QModelIndex& idx) { const QModelIndex sibling = idx.siblingAtColumn(Column::Instruction); return BranchSavesLR(m_table_proxy->data(sibling, UserRole::ClickRole).value<u32>()); @@ -844,7 +844,7 @@ void BranchWatchDialog::OnTableContextMenu(const QPoint& pos) { QAction* const action = menu->addAction(tr("Insert &BLR at start")); const bool enable_action = - Core::GetState() != Core::State::Uninitialized && + Core::GetState(m_system) != Core::State::Uninitialized && std::all_of(index_list.begin(), index_list.end(), [this](const QModelIndex& idx) { return m_table_proxy->data(idx, UserRole::ClickRole).isValid(); }); |
