summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu.cpp
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-07-11 10:31:06 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-07-11 13:32:58 -0400
commit0d49bf65a7db93c6d45864d350c3951b327625aa (patch)
tree50dd3ea3b8b8fa7c2f71b6818daccf465f64cf1a /Source/Core/InputCommon/ControllerEmu.cpp
parenta6dc3c47a9806a47421b1c04bf27b7cdd89d92f3 (diff)
ControllerEmu: Virtualize settings
This will allow us to move Background Input to a global setting rather than a local setting.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu.cpp6
1 files changed, 6 insertions, 0 deletions
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)
{