summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2019-02-03 09:25:26 -0800
committerGitHub <noreply@github.com>2019-02-03 09:25:26 -0800
commit3b4486bad3f0e44c3a572bba411879a634ece325 (patch)
tree228e2556647f4e12ca6cc546ac7fe28688c4deef /Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
parenta95b6e1b9bef1c5e1da9d41ec636eb8ef35641a1 (diff)
parent9c1a8891e5e33955781b1f07abd290742644586d (diff)
Merge pull request #7674 from jordan-woyak/wiimote-emu-cleanup
WiimoteEmu: Major cleanups
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
index 98b9e5828b..e6623ea754 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
@@ -12,8 +12,8 @@
#include "InputCommon/ControlReference/ControlReference.h"
#include "InputCommon/ControllerEmu/Control/Control.h"
+#include "InputCommon/ControllerEmu/ControlGroup/Attachments.h"
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
-#include "InputCommon/ControllerEmu/ControlGroup/Extension.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
namespace ControllerEmu
@@ -41,10 +41,10 @@ void EmulatedController::UpdateReferences(const ControllerInterface& devi)
for (auto& control : ctrlGroup->controls)
control->control_ref.get()->UpdateReference(devi, GetDefaultDevice());
- // extension
- if (ctrlGroup->type == GroupType::Extension)
+ // Attachments:
+ if (ctrlGroup->type == GroupType::Attachments)
{
- for (auto& attachment : ((Extension*)ctrlGroup.get())->attachments)
+ for (auto& attachment : static_cast<Attachments*>(ctrlGroup.get())->GetAttachmentList())
attachment->UpdateReferences(devi);
}
}
@@ -73,10 +73,10 @@ void EmulatedController::SetDefaultDevice(ciface::Core::DeviceQualifier devq)
for (auto& ctrlGroup : groups)
{
- // extension
- if (ctrlGroup->type == GroupType::Extension)
+ // Attachments:
+ if (ctrlGroup->type == GroupType::Attachments)
{
- for (auto& ai : ((Extension*)ctrlGroup.get())->attachments)
+ for (auto& ai : static_cast<Attachments*>(ctrlGroup.get())->GetAttachmentList())
{
ai->SetDefaultDevice(m_default_device);
}