InputCommon: Allow Wii remote extension to be set with an input expression.

This commit is contained in:
Jordan Woyak
2020-01-18 11:19:32 -06:00
parent e8152b700f
commit 0a1634bedf
12 changed files with 172 additions and 64 deletions

View File

@ -17,12 +17,22 @@ void Attachments::AddAttachment(std::unique_ptr<EmulatedController> att)
u32 Attachments::GetSelectedAttachment() const
{
return m_selected_attachment;
const u32 value = m_selection_value.GetValue();
if (value < m_attachments.size())
return value;
return 0;
}
void Attachments::SetSelectedAttachment(u32 val)
{
m_selected_attachment = val;
m_selection_setting.SetValue(val);
}
NumericSetting<int>& Attachments::GetSelectionSetting()
{
return m_selection_setting;
}
const std::vector<std::unique_ptr<EmulatedController>>& Attachments::GetAttachmentList() const