summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-08-31 15:10:04 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-08-31 15:37:34 -0700
commite4500b57984d0a83049e43ca6c6ef2b6a739bd11 (patch)
tree505be3a31d6c3be1750b9c46811949eb11e0332f /Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp
parentf5e7b457731f57a8de132d21790fe90761d064ee (diff)
BranchWatchDialog: Improve Branch Was/Not Overwritten Buttons
Giving a warning if these are used when not usable is bad UX.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp
index 88ce34a8d2..39e7748df4 100644
--- a/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp
+++ b/Source/Core/DolphinQt/Debugger/BranchWatchDialog.cpp
@@ -644,11 +644,6 @@ void BranchWatchDialog::OnCodePathNotTaken()
void BranchWatchDialog::OnBranchWasOverwritten()
{
- if (Core::GetState(m_system) == Core::State::Uninitialized)
- {
- ModalMessageBox::warning(this, tr("Error"), tr("Core is uninitialized."));
- return;
- }
{
const Core::CPUThreadGuard guard{m_system};
m_table_model->OnBranchWasOverwritten(guard);
@@ -659,11 +654,6 @@ void BranchWatchDialog::OnBranchWasOverwritten()
void BranchWatchDialog::OnBranchNotOverwritten()
{
- if (Core::GetState(m_system) == Core::State::Uninitialized)
- {
- ModalMessageBox::warning(this, tr("Error"), tr("Core is uninitialized."));
- return;
- }
{
const Core::CPUThreadGuard guard{m_system};
m_table_model->OnBranchNotOverwritten(guard);
@@ -689,6 +679,8 @@ void BranchWatchDialog::OnTimeout() const
void BranchWatchDialog::OnEmulationStateChanged(Core::State new_state) const
{
+ m_btn_was_overwritten->setEnabled(new_state != Core::State::Uninitialized);
+ m_btn_not_overwritten->setEnabled(new_state != Core::State::Uninitialized);
if (TimerCondition(m_branch_watch, new_state))
m_timer->start(BRANCH_WATCH_TOOL_TIMER_DELAY_MS);
else if (m_timer->isActive())