diff options
| author | Tilka <tilkax@gmail.com> | 2020-02-09 01:37:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-09 01:37:30 +0000 |
| commit | 2e2540317e8752b8fe2e4d549a0b5c1ab1911041 (patch) | |
| tree | c5997fb92fc14a5dbbc061a5b572da18d0877e86 /Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp | |
| parent | 7fe11c95782a305e1e03a401e54d819700b39805 (diff) | |
| parent | 0a1634bedf17f7b27a3781d8e5ac6bafb20cd546 (diff) | |
Merge pull request #8417 from jordan-woyak/setting-expressions
InputCommon: Allow controller settings specified with input expresions.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp index c5ff0705a2..a9c5844b48 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp @@ -14,6 +14,7 @@ #include "InputCommon/ControllerEmu/Control/Control.h" #include "InputCommon/ControllerEmu/ControlGroup/Attachments.h" #include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h" +#include "InputCommon/ControllerEmu/Setting/NumericSetting.h" #include "InputCommon/ControllerInterface/ControllerInterface.h" namespace ControllerEmu @@ -54,10 +55,17 @@ void EmulatedController::UpdateReferences(ciface::ExpressionParser::ControlEnvir for (auto& control : ctrlGroup->controls) control->control_ref->UpdateReference(env); + for (auto& setting : ctrlGroup->numeric_settings) + setting->GetInputReference().UpdateReference(env); + // Attachments: if (ctrlGroup->type == GroupType::Attachments) { - for (auto& attachment : static_cast<Attachments*>(ctrlGroup.get())->GetAttachmentList()) + auto* const attachments = static_cast<Attachments*>(ctrlGroup.get()); + + attachments->GetSelectionSetting().GetInputReference().UpdateReference(env); + + for (auto& attachment : attachments->GetAttachmentList()) attachment->UpdateReferences(env); } } |
