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);