From 27e1577da90c04b642f86d23c5884cebf22df1a0 Mon Sep 17 00:00:00 2001 From: Michael M Date: Fri, 3 Nov 2017 14:31:17 -0700 Subject: [PATCH 1/3] Qt MappingWindow: move controller type into constructor --- .../DolphinQt2/Config/ControllersWindow.cpp | 14 ++++------- .../DolphinQt2/Config/ControllersWindow.h | 2 -- .../Config/Mapping/MappingWindow.cpp | 23 ++++--------------- .../DolphinQt2/Config/Mapping/MappingWindow.h | 5 ++-- Source/Core/DolphinQt2/MainWindow.cpp | 6 ++--- 5 files changed, 14 insertions(+), 36 deletions(-) diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index ed8e08a91f..be22be811c 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -78,12 +78,6 @@ ControllersWindow::ControllersWindow(QWidget* parent) : QDialog(parent) CreateMainLayout(); LoadSettings(); ConnectWidgets(); - - for (size_t i = 0; i < m_gc_mappings.size(); i++) - m_gc_mappings[i] = new MappingWindow(this, static_cast(i)); - - for (size_t i = 0; i < m_wiimote_mappings.size(); i++) - m_wiimote_mappings[i] = new MappingWindow(this, static_cast(i)); } void ControllersWindow::CreateGamecubeLayout() @@ -440,8 +434,8 @@ void ControllersWindow::OnGCPadConfigure() default: return; } - m_gc_mappings[index]->ChangeMappingType(type); - m_gc_mappings[index]->exec(); + + MappingWindow(this, type, static_cast(index)).exec(); } void ControllersWindow::OnWiimoteConfigure() @@ -468,8 +462,8 @@ void ControllersWindow::OnWiimoteConfigure() default: return; } - m_wiimote_mappings[index]->ChangeMappingType(type); - m_wiimote_mappings[index]->exec(); + + MappingWindow(this, type, static_cast(index)).exec(); } void ControllersWindow::UnimplementedButton() diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.h b/Source/Core/DolphinQt2/Config/ControllersWindow.h index 171e44ca3c..3a1def39ad 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.h +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.h @@ -51,7 +51,6 @@ private: QDialogButtonBox* m_button_box; // Gamecube - std::array m_gc_mappings; QGroupBox* m_gc_box; QGridLayout* m_gc_layout; std::array m_gc_controller_boxes; @@ -59,7 +58,6 @@ private: std::array m_gc_groups; // Wii Remote - std::array m_wiimote_mappings; QGroupBox* m_wiimote_box; QGridLayout* m_wiimote_layout; std::array m_wiimote_labels; diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp index 7e83e0e4ae..60efad03c6 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp @@ -32,12 +32,12 @@ #include "DolphinQt2/Config/Mapping/WiimoteEmuMotionControl.h" #include "DolphinQt2/Settings.h" #include "InputCommon/ControllerEmu/ControllerEmu.h" +#include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/Device.h" #include "InputCommon/InputConfig.h" -#include "InputCommon/ControllerInterface/ControllerInterface.h" - -MappingWindow::MappingWindow(QWidget* parent, int port_num) : QDialog(parent), m_port(port_num) +MappingWindow::MappingWindow(QWidget* parent, Type type, int port_num) + : QDialog(parent), m_port(port_num) { setWindowTitle(tr("Port %1").arg(port_num + 1)); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); @@ -47,6 +47,7 @@ MappingWindow::MappingWindow(QWidget* parent, int port_num) : QDialog(parent), m CreateResetLayout(); CreateMainLayout(); ConnectWidgets(); + SetMappingType(type); } void MappingWindow::CreateDevicesLayout() @@ -237,13 +238,8 @@ void MappingWindow::RefreshDevices() }); } -void MappingWindow::ChangeMappingType(MappingWindow::Type type) +void MappingWindow::SetMappingType(MappingWindow::Type type) { - if (m_mapping_type == type) - return; - - ClearWidgets(); - m_controller = nullptr; MappingWidget* widget; @@ -297,8 +293,6 @@ void MappingWindow::ChangeMappingType(MappingWindow::Type type) widget->LoadSettings(); - m_profiles_combo->clear(); - m_config = widget->GetConfig(); if (m_config) @@ -320,13 +314,6 @@ void MappingWindow::ChangeMappingType(MappingWindow::Type type) if (m_controller != nullptr) RefreshDevices(); - - m_mapping_type = type; -} - -void MappingWindow::ClearWidgets() -{ - m_tab_widget->clear(); } void MappingWindow::AddWidget(const QString& name, QWidget* widget) diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h index 3a7a308433..b7c0060f99 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h @@ -46,8 +46,7 @@ public: MAPPING_HOTKEYS }; - explicit MappingWindow(QWidget* parent, int port_num); - void ChangeMappingType(Type type); + explicit MappingWindow(QWidget* parent, Type type, int port_num); int GetPort() const; const ciface::Core::DeviceQualifier& GetDeviceQualifier() const; @@ -59,6 +58,7 @@ signals: void ClearFields(); private: + void SetMappingType(Type type); void CreateDevicesLayout(); void CreateProfilesLayout(); void CreateResetLayout(); @@ -67,7 +67,6 @@ private: void SetLayoutComplex(bool is_complex); void AddWidget(const QString& name, QWidget* widget); - void ClearWidgets(); void RefreshDevices(); diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index e92f794f6f..3c7d265aea 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -73,6 +73,8 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters) : QMainW setUnifiedTitleAndToolBarOnMac(true); setAcceptDrops(true); + InitControllers(); + CreateComponents(); ConnectGameList(); @@ -81,7 +83,6 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters) : QMainW ConnectStack(); ConnectMenuBar(); - InitControllers(); InitCoreCallbacks(); NetPlayInit(); @@ -154,7 +155,7 @@ void MainWindow::CreateComponents() m_stack = new QStackedWidget(this); m_controllers_window = new ControllersWindow(this); m_settings_window = new SettingsWindow(this); - m_hotkey_window = new MappingWindow(this, 0); + m_hotkey_window = new MappingWindow(this, MappingWindow::Type::MAPPING_HOTKEYS, 0); m_log_widget = new LogWidget(this); m_log_config_widget = new LogConfigWidget(this); @@ -570,7 +571,6 @@ void MainWindow::ShowAboutDialog() void MainWindow::ShowHotkeyDialog() { - m_hotkey_window->ChangeMappingType(MappingWindow::Type::MAPPING_HOTKEYS); m_hotkey_window->show(); m_hotkey_window->raise(); m_hotkey_window->activateWindow(); From a8b5eab4c4ed16547e0bd66103e0300af634fc64 Mon Sep 17 00:00:00 2001 From: Michael M Date: Fri, 3 Nov 2017 14:47:36 -0700 Subject: [PATCH 2/3] Qt GCPadWiiU: standalone dialog, not subclass of MappingWidget It uses none of the functionality of MappingWidget or the parent MappingWindow, and complicates the definition of the MappingWidget interface. --- .../DolphinQt2/Config/ControllersWindow.cpp | 5 ++- .../DolphinQt2/Config/Mapping/GCPadWiiU.cpp | 21 +++++----- .../DolphinQt2/Config/Mapping/GCPadWiiU.h | 16 ++++---- .../Config/Mapping/MappingWindow.cpp | 40 +++++-------------- .../DolphinQt2/Config/Mapping/MappingWindow.h | 3 -- 5 files changed, 32 insertions(+), 53 deletions(-) diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index be22be811c..86f238761d 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -28,6 +28,7 @@ #include "Core/IOS/IOS.h" #include "Core/IOS/USB/Bluetooth/BTReal.h" #include "Core/NetPlayProto.h" +#include "DolphinQt2/Config/Mapping/GCPadWiiU.h" #include "DolphinQt2/Config/Mapping/MappingWindow.h" #include "DolphinQt2/Settings.h" #include "UICommon/UICommon.h" @@ -417,8 +418,8 @@ void ControllersWindow::OnGCPadConfigure() type = MappingWindow::Type::MAPPING_GCPAD; break; case 2: // GameCube Adapter for Wii U - type = MappingWindow::Type::MAPPING_GCPAD_WIIU; - break; + GCPadWiiU(index, this).exec(); + return; case 3: // Steering Wheel type = MappingWindow::Type::MAPPING_GC_STEERINGWHEEL; break; diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp index 11193b8bbd..f08c4b6693 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include #include @@ -11,7 +12,7 @@ #include "Core/ConfigManager.h" #include "InputCommon/GCAdapter.h" -GCPadWiiU::GCPadWiiU(MappingWindow* window) : MappingWidget(window) +GCPadWiiU::GCPadWiiU(int port, QWidget* parent) : QDialog(parent), m_port{port} { CreateLayout(); ConnectWidgets(); @@ -21,15 +22,19 @@ GCPadWiiU::GCPadWiiU(MappingWindow* window) : MappingWidget(window) void GCPadWiiU::CreateLayout() { + setWindowTitle(tr("GameCube Adapter for Wii U at Port %1").arg(m_port + 1)); + const bool detected = GCAdapter::IsDetected(); m_layout = new QVBoxLayout(); m_status_label = new QLabel(detected ? tr("Adapter Detected") : tr("No Adapter Detected")); m_rumble = new QCheckBox(tr("Enable Rumble")); m_simulate_bongos = new QCheckBox(tr("Simulate DK Bongos")); + m_button_box = new QDialogButtonBox(QDialogButtonBox::Ok); m_layout->addWidget(m_status_label); m_layout->addWidget(m_rumble); m_layout->addWidget(m_simulate_bongos); + m_layout->addWidget(m_button_box); if (!detected) { @@ -44,21 +49,17 @@ void GCPadWiiU::ConnectWidgets() { connect(m_rumble, &QCheckBox::toggled, this, &GCPadWiiU::SaveSettings); connect(m_simulate_bongos, &QCheckBox::toggled, this, &GCPadWiiU::SaveSettings); + connect(m_button_box, &QDialogButtonBox::accepted, this, &GCPadWiiU::accept); } void GCPadWiiU::LoadSettings() { - m_rumble->setChecked(SConfig::GetInstance().m_AdapterRumble[GetPort()]); - m_simulate_bongos->setChecked(SConfig::GetInstance().m_AdapterKonga[GetPort()]); + m_rumble->setChecked(SConfig::GetInstance().m_AdapterRumble[m_port]); + m_simulate_bongos->setChecked(SConfig::GetInstance().m_AdapterKonga[m_port]); } void GCPadWiiU::SaveSettings() { - SConfig::GetInstance().m_AdapterRumble[GetPort()] = m_rumble->isChecked(); - SConfig::GetInstance().m_AdapterKonga[GetPort()] = m_simulate_bongos->isChecked(); -} - -InputConfig* GCPadWiiU::GetConfig() -{ - return nullptr; + SConfig::GetInstance().m_AdapterRumble[m_port] = m_rumble->isChecked(); + SConfig::GetInstance().m_AdapterKonga[m_port] = m_simulate_bongos->isChecked(); } diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h index 5c3cbbe9ac..bbbacf94bb 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h +++ b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h @@ -4,28 +4,30 @@ #pragma once -#include "DolphinQt2/Config/Mapping/MappingWidget.h" +#include class QCheckBox; class QLabel; +class QDialogButtonBox; class QVBoxLayout; -class GCPadWiiU final : public MappingWidget +class GCPadWiiU final : public QDialog { public: - explicit GCPadWiiU(MappingWindow* window); - - InputConfig* GetConfig() override; + explicit GCPadWiiU(int port, QWidget* parent = nullptr); private: - void LoadSettings() override; - void SaveSettings() override; + void LoadSettings(); + void SaveSettings(); void CreateLayout(); void ConnectWidgets(); + int m_port; + QVBoxLayout* m_layout; QLabel* m_status_label; + QDialogButtonBox* m_button_box; // Checkboxes QCheckBox* m_rumble; diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp index 60efad03c6..446680cdd5 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp @@ -20,7 +20,6 @@ #include "Core/Core.h" #include "DolphinQt2/Config/Mapping/GCKeyboardEmu.h" #include "DolphinQt2/Config/Mapping/GCPadEmu.h" -#include "DolphinQt2/Config/Mapping/GCPadWiiU.h" #include "DolphinQt2/Config/Mapping/Hotkey3D.h" #include "DolphinQt2/Config/Mapping/HotkeyGeneral.h" #include "DolphinQt2/Config/Mapping/HotkeyGraphics.h" @@ -240,8 +239,6 @@ void MappingWindow::RefreshDevices() void MappingWindow::SetMappingType(MappingWindow::Type type) { - m_controller = nullptr; - MappingWidget* widget; switch (type) @@ -259,11 +256,6 @@ void MappingWindow::SetMappingType(MappingWindow::Type type) setWindowTitle(tr("GameCube Controller at Port %1").arg(GetPort() + 1)); AddWidget(tr("GameCube Controller"), widget); break; - case Type::MAPPING_GCPAD_WIIU: - widget = new GCPadWiiU(this); - setWindowTitle(tr("GameCube Adapter for Wii U at Port %1").arg(GetPort() + 1)); - AddWidget(tr("GameCube Adapter for Wii U"), widget); - break; case Type::MAPPING_WIIMOTE_EMU: case Type::MAPPING_WIIMOTE_HYBRID: { @@ -295,23 +287,18 @@ void MappingWindow::SetMappingType(MappingWindow::Type type) m_config = widget->GetConfig(); - if (m_config) + m_controller = m_config->GetController(GetPort()); + m_profiles_combo->addItem(QStringLiteral("")); + + const std::string profiles_path = + File::GetUserPath(D_CONFIG_IDX) + "Profiles/" + m_config->GetProfileName(); + for (const auto& filename : Common::DoFileSearch({profiles_path}, {".ini"})) { - m_controller = m_config->GetController(GetPort()); - m_profiles_combo->addItem(QStringLiteral("")); - - const std::string profiles_path = - File::GetUserPath(D_CONFIG_IDX) + "Profiles/" + m_config->GetProfileName(); - for (const auto& filename : Common::DoFileSearch({profiles_path}, {".ini"})) - { - std::string basename; - SplitPath(filename, nullptr, &basename, nullptr); - m_profiles_combo->addItem(QString::fromStdString(basename), QString::fromStdString(filename)); - } + std::string basename; + SplitPath(filename, nullptr, &basename, nullptr); + m_profiles_combo->addItem(QString::fromStdString(basename), QString::fromStdString(filename)); } - SetLayoutComplex(type != Type::MAPPING_GCPAD_WIIU); - if (m_controller != nullptr) RefreshDevices(); } @@ -321,15 +308,6 @@ void MappingWindow::AddWidget(const QString& name, QWidget* widget) m_tab_widget->addTab(widget, name); } -void MappingWindow::SetLayoutComplex(bool is_complex) -{ - m_reset_box->setHidden(!is_complex); - m_profiles_box->setHidden(!is_complex); - m_devices_box->setHidden(!is_complex); - - m_is_complex = is_complex; -} - int MappingWindow::GetPort() const { return m_port; diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h index b7c0060f99..fee581c175 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h @@ -37,7 +37,6 @@ public: MAPPING_GC_DANCEMAT, MAPPING_GC_KEYBOARD, MAPPING_GCPAD, - MAPPING_GCPAD_WIIU, MAPPING_GC_STEERINGWHEEL, // Wii MAPPING_WIIMOTE_EMU, @@ -65,7 +64,6 @@ private: void CreateMainLayout(); void ConnectWidgets(); - void SetLayoutComplex(bool is_complex); void AddWidget(const QString& name, QWidget* widget); void RefreshDevices(); @@ -107,7 +105,6 @@ private: Type m_mapping_type; const int m_port; - bool m_is_complex; InputConfig* m_config; ciface::Core::DeviceQualifier m_devq; }; From cb47857e8abffb00c390a90718ca9b83d1822fa4 Mon Sep 17 00:00:00 2001 From: Michael M Date: Sat, 4 Nov 2017 18:45:37 -0700 Subject: [PATCH 3/3] Rename GCPadWiiU -> GCPadWiiUConfigDialog This name better reflects its new standalone functionality. --- Source/Core/DolphinQt2/CMakeLists.txt | 2 +- .../DolphinQt2/Config/ControllersWindow.cpp | 4 ++-- ...CPadWiiU.cpp => GCPadWiiUConfigDialog.cpp} | 19 ++++++++++--------- .../{GCPadWiiU.h => GCPadWiiUConfigDialog.h} | 4 ++-- Source/Core/DolphinQt2/DolphinQt2.vcxproj | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) rename Source/Core/DolphinQt2/Config/Mapping/{GCPadWiiU.cpp => GCPadWiiUConfigDialog.cpp} (75%) rename Source/Core/DolphinQt2/Config/Mapping/{GCPadWiiU.h => GCPadWiiUConfigDialog.h} (80%) diff --git a/Source/Core/DolphinQt2/CMakeLists.txt b/Source/Core/DolphinQt2/CMakeLists.txt index 16ddc53540..ff66dada5a 100644 --- a/Source/Core/DolphinQt2/CMakeLists.txt +++ b/Source/Core/DolphinQt2/CMakeLists.txt @@ -50,7 +50,7 @@ set(SRCS Config/LogWidget.cpp Config/Mapping/GCKeyboardEmu.cpp Config/Mapping/GCPadEmu.cpp - Config/Mapping/GCPadWiiU.cpp + Config/Mapping/GCPadWiiUConfigDialog.cpp Config/Mapping/Hotkey3D.cpp Config/Mapping/HotkeyGeneral.cpp Config/Mapping/HotkeyGraphics.cpp diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index 86f238761d..ea54ea880d 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -28,7 +28,7 @@ #include "Core/IOS/IOS.h" #include "Core/IOS/USB/Bluetooth/BTReal.h" #include "Core/NetPlayProto.h" -#include "DolphinQt2/Config/Mapping/GCPadWiiU.h" +#include "DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h" #include "DolphinQt2/Config/Mapping/MappingWindow.h" #include "DolphinQt2/Settings.h" #include "UICommon/UICommon.h" @@ -418,7 +418,7 @@ void ControllersWindow::OnGCPadConfigure() type = MappingWindow::Type::MAPPING_GCPAD; break; case 2: // GameCube Adapter for Wii U - GCPadWiiU(index, this).exec(); + GCPadWiiUConfigDialog(static_cast(index), this).exec(); return; case 3: // Steering Wheel type = MappingWindow::Type::MAPPING_GC_STEERINGWHEEL; diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.cpp similarity index 75% rename from Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp rename to Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.cpp index f08c4b6693..1b20728690 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.cpp @@ -7,12 +7,13 @@ #include #include -#include "DolphinQt2/Config/Mapping/GCPadWiiU.h" +#include "DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h" #include "Core/ConfigManager.h" #include "InputCommon/GCAdapter.h" -GCPadWiiU::GCPadWiiU(int port, QWidget* parent) : QDialog(parent), m_port{port} +GCPadWiiUConfigDialog::GCPadWiiUConfigDialog(int port, QWidget* parent) + : QDialog(parent), m_port{port} { CreateLayout(); ConnectWidgets(); @@ -20,7 +21,7 @@ GCPadWiiU::GCPadWiiU(int port, QWidget* parent) : QDialog(parent), m_port{port} LoadSettings(); } -void GCPadWiiU::CreateLayout() +void GCPadWiiUConfigDialog::CreateLayout() { setWindowTitle(tr("GameCube Adapter for Wii U at Port %1").arg(m_port + 1)); @@ -45,20 +46,20 @@ void GCPadWiiU::CreateLayout() setLayout(m_layout); } -void GCPadWiiU::ConnectWidgets() +void GCPadWiiUConfigDialog::ConnectWidgets() { - connect(m_rumble, &QCheckBox::toggled, this, &GCPadWiiU::SaveSettings); - connect(m_simulate_bongos, &QCheckBox::toggled, this, &GCPadWiiU::SaveSettings); - connect(m_button_box, &QDialogButtonBox::accepted, this, &GCPadWiiU::accept); + connect(m_rumble, &QCheckBox::toggled, this, &GCPadWiiUConfigDialog::SaveSettings); + connect(m_simulate_bongos, &QCheckBox::toggled, this, &GCPadWiiUConfigDialog::SaveSettings); + connect(m_button_box, &QDialogButtonBox::accepted, this, &GCPadWiiUConfigDialog::accept); } -void GCPadWiiU::LoadSettings() +void GCPadWiiUConfigDialog::LoadSettings() { m_rumble->setChecked(SConfig::GetInstance().m_AdapterRumble[m_port]); m_simulate_bongos->setChecked(SConfig::GetInstance().m_AdapterKonga[m_port]); } -void GCPadWiiU::SaveSettings() +void GCPadWiiUConfigDialog::SaveSettings() { SConfig::GetInstance().m_AdapterRumble[m_port] = m_rumble->isChecked(); SConfig::GetInstance().m_AdapterKonga[m_port] = m_simulate_bongos->isChecked(); diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h similarity index 80% rename from Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h rename to Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h index bbbacf94bb..851b50a6fa 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h +++ b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h @@ -11,10 +11,10 @@ class QLabel; class QDialogButtonBox; class QVBoxLayout; -class GCPadWiiU final : public QDialog +class GCPadWiiUConfigDialog final : public QDialog { public: - explicit GCPadWiiU(int port, QWidget* parent = nullptr); + explicit GCPadWiiUConfigDialog(int port, QWidget* parent = nullptr); private: void LoadSettings(); diff --git a/Source/Core/DolphinQt2/DolphinQt2.vcxproj b/Source/Core/DolphinQt2/DolphinQt2.vcxproj index 8d55c59e73..8ac0466b49 100644 --- a/Source/Core/DolphinQt2/DolphinQt2.vcxproj +++ b/Source/Core/DolphinQt2/DolphinQt2.vcxproj @@ -177,7 +177,7 @@ - +