Skip to content

Commit

Permalink
Qt/ControllersWindow: Fix incorrect enabled states of configure buttons
Browse files Browse the repository at this point in the history
All configure buttons would be enabled, although no-op, upon
initialization of the dialog. Changing a setting to cause a save would
fix them.
  • Loading branch information
Techjar committed Nov 23, 2018
1 parent 1805f51 commit 9bb3c7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Core/DolphinQt/Config/ControllersWindow.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -465,8 +465,12 @@ void ControllersWindow::LoadSettings()
{ {
const std::optional<int> gc_index = ToGCMenuIndex(SConfig::GetInstance().m_SIDevice[i]); const std::optional<int> gc_index = ToGCMenuIndex(SConfig::GetInstance().m_SIDevice[i]);
if (gc_index) if (gc_index)
{
m_gc_controller_boxes[i]->setCurrentIndex(*gc_index); m_gc_controller_boxes[i]->setCurrentIndex(*gc_index);
m_gc_buttons[i]->setEnabled(*gc_index != 0 && *gc_index != 6);
}
m_wiimote_boxes[i]->setCurrentIndex(g_wiimote_sources[i]); m_wiimote_boxes[i]->setCurrentIndex(g_wiimote_sources[i]);
m_wiimote_buttons[i]->setEnabled(g_wiimote_sources[i] != 0 && g_wiimote_sources[i] != 2);
} }
m_wiimote_real_balance_board->setChecked(g_wiimote_sources[WIIMOTE_BALANCE_BOARD] == m_wiimote_real_balance_board->setChecked(g_wiimote_sources[WIIMOTE_BALANCE_BOARD] ==
WIIMOTE_SRC_REAL); WIIMOTE_SRC_REAL);
Expand Down

0 comments on commit 9bb3c7d

Please sign in to comment.