Skip to content
Permalink
Browse files

Merge pull request #8449 from JosJuice/disable-bt-pt-buttons

DolphinQt: Fix the enabling/disabling of ControllersWindow buttons
  • Loading branch information...
stenzek committed Nov 8, 2019
2 parents 5440be9 + ef1bae5 commit b554b636bd8a96634203fb402680b4d58b4dba8c
Showing with 8 additions and 6 deletions.
  1. +8 −6 Source/Core/DolphinQt/Config/ControllersWindow.cpp
@@ -377,23 +377,25 @@ void ControllersWindow::OnWiimoteRefreshPressed()

void ControllersWindow::OnEmulationStateChanged(bool running)
{
const bool passthrough = SConfig::GetInstance().m_bt_passthrough_enabled;

if (!SConfig::GetInstance().bWii)
{
m_wiimote_sync->setEnabled(!running);
m_wiimote_reset->setEnabled(!running);
m_wiimote_sync->setEnabled(!running && passthrough);
m_wiimote_reset->setEnabled(!running && passthrough);

for (size_t i = 0; i < m_wiimote_groups.size(); i++)
m_wiimote_boxes[i]->setEnabled(!running);
m_wiimote_boxes[i]->setEnabled(!running && !passthrough);
}

m_wiimote_emu->setEnabled(!running);
m_wiimote_passthrough->setEnabled(!running);

if (!SConfig::GetInstance().bWii)
{
m_wiimote_real_balance_board->setEnabled(!running);
m_wiimote_continuous_scanning->setEnabled(!running);
m_wiimote_speaker_data->setEnabled(!running);
m_wiimote_real_balance_board->setEnabled(!running && !passthrough);
m_wiimote_continuous_scanning->setEnabled(!running && !passthrough);
m_wiimote_speaker_data->setEnabled(!running && !passthrough);
}
}

0 comments on commit b554b63

Please sign in to comment.
You can’t perform that action at this time.