From 27e1577da90c04b642f86d23c5884cebf22df1a0 Mon Sep 17 00:00:00 2001 From: Michael M Date: Fri, 3 Nov 2017 14:31:17 -0700 Subject: Qt MappingWindow: move controller type into constructor --- Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'Source/Core/DolphinQt2/Config/ControllersWindow.cpp') 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() -- cgit v1.2.3 From a8b5eab4c4ed16547e0bd66103e0300af634fc64 Mon Sep 17 00:00:00 2001 From: Michael M Date: Fri, 3 Nov 2017 14:47:36 -0700 Subject: 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. --- Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/DolphinQt2/Config/ControllersWindow.cpp') 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; -- cgit v1.2.3 From cb47857e8abffb00c390a90718ca9b83d1822fa4 Mon Sep 17 00:00:00 2001 From: Michael M Date: Sat, 4 Nov 2017 18:45:37 -0700 Subject: Rename GCPadWiiU -> GCPadWiiUConfigDialog This name better reflects its new standalone functionality. --- Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DolphinQt2/Config/ControllersWindow.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; -- cgit v1.2.3