summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2018-12-30 16:08:54 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2019-10-11 17:14:45 -0500
commit35e51ebbaa025bad87deb4668e0b32249dd62d77 (patch)
tree4fa84a78b5b321d88e763c2b28c5c5a46bbbd31b /Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
parente896835f86e52051b1998a344549dfa8ba79847a (diff)
ExpressionParser: Clear expression variables on UpdateReferences call. I don't know if this is most sensible.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
index c5ff0705a2..2cf5edbb00 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
@@ -40,6 +40,9 @@ void EmulatedController::UpdateReferences(const ControllerInterface& devi)
{
m_default_device_is_connected = devi.HasConnectedDevice(m_default_device);
+ // Reset variables:
+ m_expression_vars.clear();
+
ciface::ExpressionParser::ControlEnvironment env(devi, GetDefaultDevice(), m_expression_vars);
UpdateReferences(env);