From 0c9f6c2a2b01ae32a92f95dabb4c35ac008a83e1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 16 Jun 2014 10:15:21 -0400 Subject: ControllerEmu: Remove unnecessary include --- Source/Core/InputCommon/ControllerEmu.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index dae3d32e56..cf906a0da6 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -4,10 +4,6 @@ #include "InputCommon/ControllerEmu.h" -#if defined(HAVE_X11) && HAVE_X11 -#include -#endif - void ControllerEmu::UpdateReferences(ControllerInterface& devi) { for (auto& ctrlGroup : groups) -- cgit v1.2.3 From d468c3833570f9bcd1e1fc41bc4a703727e767d4 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 16 Jun 2014 10:15:56 -0400 Subject: ControllerEmu: Fix code style --- Source/Core/InputCommon/ControllerEmu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index cf906a0da6..6d58e23e9b 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -181,8 +181,7 @@ ControllerEmu::Force::Force(const std::string& _name) : ControlGroup(_name, GROU settings.emplace_back(new Setting(_trans("Dead Zone"), 0, 0, 50)); } -ControllerEmu::Tilt::Tilt(const std::string& _name) - : ControlGroup(_name, GROUP_TYPE_TILT) +ControllerEmu::Tilt::Tilt(const std::string& _name) : ControlGroup(_name, GROUP_TYPE_TILT) { memset(m_tilt, 0, sizeof(m_tilt)); -- cgit v1.2.3 From f2d4f10fc9deb75d8dfe6da1d71326d50afc0e99 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 11 Jul 2014 08:07:41 -0400 Subject: ControllerEmu: Remove support for the "Square Stick" option It was only used for really old joypads which we really don't want to support. If users have these joypads, they should look into using something at the OS level, as games shouldn't need to have this transformation; it should be done by the OS and driver. --- Source/Core/InputCommon/ControllerEmu.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index 6d58e23e9b..e01ab90fb9 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -140,8 +140,6 @@ ControllerEmu::AnalogStick::AnalogStick(const char* const _name) : ControlGroup( settings.emplace_back(new Setting(_trans("Radius"), 0.7f, 0, 100)); settings.emplace_back(new Setting(_trans("Dead Zone"), 0, 0, 50)); - settings.emplace_back(new Setting(_trans("Square Stick"), 0)); - } ControllerEmu::Buttons::Buttons(const std::string& _name) : ControlGroup(_name, GROUP_TYPE_BUTTONS) -- cgit v1.2.3 From 0d49bf65a7db93c6d45864d350c3951b327625aa Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 11 Jul 2014 10:31:06 -0400 Subject: ControllerEmu: Virtualize settings This will allow us to move Background Input to a global setting rather than a local setting. --- Source/Core/InputCommon/ControllerEmu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/Core/InputCommon/ControllerEmu.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp index e01ab90fb9..6e2bf8aa73 100644 --- a/Source/Core/InputCommon/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu.cpp @@ -43,6 +43,8 @@ void ControllerEmu::ControlGroup::LoadConfig(IniFile::Section *sec, const std::s // settings for (auto& s : settings) { + if (s->is_virtual) + continue; sec->Get(group + s->name, &s->value, s->default_value * 100); s->value /= 100; } @@ -99,7 +101,11 @@ void ControllerEmu::ControlGroup::SaveConfig(IniFile::Section *sec, const std::s std::string group(base + name); group += "/"; for (auto& s : settings) + { + if (s->is_virtual) + continue; sec->Set(group + s->name, s->value*100.0f, s->default_value*100.0f); + } for (auto& c : controls) { -- cgit v1.2.3