summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.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/ControlGroup/Attachments.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/ControlGroup/Attachments.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp
new file mode 100644
index 0000000000..e104918fe2
--- /dev/null
+++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp
@@ -0,0 +1,33 @@
+// Copyright 2017 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#include "InputCommon/ControllerEmu/ControlGroup/Attachments.h"
+
+namespace ControllerEmu
+{
+Attachments::Attachments(const std::string& name_) : ControlGroup(name_, GroupType::Attachments)
+{
+}
+
+void Attachments::AddAttachment(std::unique_ptr<EmulatedController> att)
+{
+ m_attachments.emplace_back(std::move(att));
+}
+
+u32 Attachments::GetSelectedAttachment() const
+{
+ return m_selected_attachment;
+}
+
+void Attachments::SetSelectedAttachment(u32 val)
+{
+ m_selected_attachment = val;
+}
+
+const std::vector<std::unique_ptr<EmulatedController>>& Attachments::GetAttachmentList() const
+{
+ return m_attachments;
+}
+
+} // namespace ControllerEmu