summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/ControllerEmu.cpp5
-rw-r--r--Source/Core/InputCommon/ControllerEmu.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp
index 6a00eb5156..3c32afbde2 100644
--- a/Source/Core/InputCommon/ControllerEmu.cpp
+++ b/Source/Core/InputCommon/ControllerEmu.cpp
@@ -143,6 +143,11 @@ void ControllerEmu::SaveConfig(IniFile::Section *sec, const std::string& base)
ctrlGroup->SaveConfig(sec, defdev, base);
}
+void ControllerEmu::ControlGroup::SetControlExpression(int index, const std::string& expression)
+{
+ controls.at(index)->control_ref->expression = expression;
+}
+
ControllerEmu::AnalogStick::AnalogStick(const char* const _name, ControlState default_radius)
: AnalogStick(_name, _name, GROUP_TYPE_STICK)
{}
diff --git a/Source/Core/InputCommon/ControllerEmu.h b/Source/Core/InputCommon/ControllerEmu.h
index db6e23f636..6fcc30e9e3 100644
--- a/Source/Core/InputCommon/ControllerEmu.h
+++ b/Source/Core/InputCommon/ControllerEmu.h
@@ -154,6 +154,8 @@ public:
virtual void LoadConfig(IniFile::Section *sec, const std::string& defdev = "", const std::string& base = "" );
virtual void SaveConfig(IniFile::Section *sec, const std::string& defdev = "", const std::string& base = "" );
+ void SetControlExpression(int index, const std::string& expression);
+
const std::string name;
const std::string ui_name;
const unsigned int type;