diff options
| author | Mat M <mathew1800@gmail.com> | 2018-04-17 18:09:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-17 18:09:58 -0400 |
| commit | df44aa7335d6046f350430976706915c70ebd108 (patch) | |
| tree | 499cb7dfc53058e7c01cc9f781b67be6812b3a1b /Source/Core/DolphinQt2/Config/ControllersWindow.cpp | |
| parent | d2301944642c51e22bca4217263e32a4670ca9b5 (diff) | |
| parent | 2953cf201dc5f00ca79f1c16cbd62136097ff77f (diff) | |
Merge pull request #6668 from JosJuice/remove-hybrid-wiimote
Remove Hybrid Wii Remote
Diffstat (limited to 'Source/Core/DolphinQt2/Config/ControllersWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index cb62e6e50d..ad94caa1a2 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -42,9 +42,6 @@ static const std::map<SerialInterface::SIDevices, int> s_gc_types = { {SerialInterface::SIDEVICE_DANCEMAT, 4}, {SerialInterface::SIDEVICE_GC_TARUKONGA, 5}, {SerialInterface::SIDEVICE_GC_GBA, 6}, {SerialInterface::SIDEVICE_GC_KEYBOARD, 7}}; -static const std::map<int, int> s_wiimote_types = { - {WIIMOTE_SRC_NONE, 0}, {WIIMOTE_SRC_EMU, 1}, {WIIMOTE_SRC_REAL, 2}, {WIIMOTE_SRC_HYBRID, 3}}; - static int ToGCMenuIndex(const SerialInterface::SIDevices sidevice) { return s_gc_types.at(sidevice); @@ -57,18 +54,6 @@ static SerialInterface::SIDevices FromGCMenuIndex(const int menudevice) return it->first; } -static int ToWiimoteMenuIndex(const int device) -{ - return s_wiimote_types.at(device); -} - -static int FromWiimoteMenuIndex(const int menudevice) -{ - auto it = std::find_if(s_wiimote_types.begin(), s_wiimote_types.end(), - [=](auto pair) { return pair.second == menudevice; }); - return it->first; -} - ControllersWindow::ControllersWindow(QWidget* parent) : QDialog(parent) { setWindowTitle(tr("Controller Settings")); @@ -189,11 +174,8 @@ void ControllersWindow::CreateWiimoteLayout() auto* wm_box = m_wiimote_boxes[i] = new QComboBox(); auto* wm_button = m_wiimote_buttons[i] = new QPushButton(tr("Configure")); - for (const auto& item : - {tr("None"), tr("Emulated Wii Remote"), tr("Real Wii Remote"), tr("Hybrid Wii Remote")}) - { + for (const auto& item : {tr("None"), tr("Emulated Wii Remote"), tr("Real Wii Remote")}) wm_box->addItem(item); - } int wm_row = m_wiimote_layout->rowCount(); m_wiimote_layout->addWidget(wm_label, wm_row, 1); @@ -458,9 +440,6 @@ void ControllersWindow::OnWiimoteConfigure() case 1: // Emulated Wii Remote type = MappingWindow::Type::MAPPING_WIIMOTE_EMU; break; - case 3: // Hybrid Wii Remote - type = MappingWindow::Type::MAPPING_WIIMOTE_HYBRID; - break; default: return; } @@ -482,7 +461,7 @@ void ControllersWindow::LoadSettings() for (size_t i = 0; i < m_wiimote_groups.size(); i++) { m_gc_controller_boxes[i]->setCurrentIndex(ToGCMenuIndex(SConfig::GetInstance().m_SIDevice[i])); - m_wiimote_boxes[i]->setCurrentIndex(ToWiimoteMenuIndex(g_wiimote_sources[i])); + m_wiimote_boxes[i]->setCurrentIndex(g_wiimote_sources[i]); } m_wiimote_real_balance_board->setChecked(g_wiimote_sources[WIIMOTE_BALANCE_BOARD] == WIIMOTE_SRC_REAL); @@ -513,7 +492,7 @@ void ControllersWindow::SaveSettings() for (size_t i = 0; i < m_wiimote_groups.size(); i++) { const int index = m_wiimote_boxes[i]->currentIndex(); - g_wiimote_sources[i] = FromWiimoteMenuIndex(index); + g_wiimote_sources[i] = index; m_wiimote_buttons[i]->setEnabled(index != 0 && index != 2); } |
