From 3d7b613be59bb8ecbd243dddffa8714ea23aae05 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 2 May 2018 16:55:42 +0200 Subject: [PATCH 1/2] Qt/Mapping: Fix "Default" not working properly. --- Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp | 1 + Source/Core/DolphinQt2/Config/Mapping/MappingWidget.h | 4 ++-- Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp | 1 + Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp index 7ec19c7a04..ef3dddeaa1 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.cpp @@ -24,6 +24,7 @@ MappingWidget::MappingWidget(MappingWindow* window) : m_parent(window) { connect(window, &MappingWindow::ClearFields, this, &MappingWidget::OnClearFields); connect(window, &MappingWindow::Update, this, &MappingWidget::Update); + connect(window, &MappingWindow::Save, this, &MappingWidget::SaveSettings); } MappingWindow* MappingWidget::GetParent() const diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.h b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.h index 5f6caff381..def4c46ed2 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.h +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWidget.h @@ -24,7 +24,7 @@ namespace ControllerEmu class Control; class ControlGroup; class EmulatedController; -} +} // namespace ControllerEmu namespace ciface { @@ -32,7 +32,7 @@ namespace Core { class Device; } -} +} // namespace ciface class MappingWidget : public QWidget { diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp index fbbcb59c17..218370dd67 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp @@ -345,6 +345,7 @@ void MappingWindow::OnDefaultFieldsPressed() m_controller->LoadDefaults(g_controller_interface); m_controller->UpdateReferences(g_controller_interface); emit Update(); + emit Save(); } bool MappingWindow::IsIterativeInput() const diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h index 242087c014..27c36e1726 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.h @@ -56,6 +56,7 @@ public: signals: void Update(); void ClearFields(); + void Save(); private: void SetMappingType(Type type); From e3cebebe515c6e377e616d0e310fb82581604b14 Mon Sep 17 00:00:00 2001 From: spycrab Date: Wed, 2 May 2018 17:02:14 +0200 Subject: [PATCH 2/2] Qt/MappingButton: Fix Clear not resetting ranges --- Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp index 4598099c89..f77f81cb6c 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingButton.cpp @@ -130,6 +130,7 @@ void MappingButton::OnButtonTimeout() void MappingButton::Clear() { m_reference->SetExpression(""); + m_reference->range = 100; m_parent->SaveSettings(); Update(); }