CommonHostInterface: Use string list for autofire bindings

Fixes autofire bindings on Android.
This commit is contained in:
Connor McLaughlin 2021-05-25 14:14:36 +10:00
parent 08876d132f
commit e8a21d32dc
1 changed files with 4 additions and 4 deletions

View File

@ -1620,12 +1620,12 @@ void CommonHostInterface::UpdateControllerInputMap(SettingsInterface& si)
if (button_name.empty())
continue;
const std::string binding(
si.GetStringValue(category, TinyString::FromFormat("AutoFire%u", turbo_button_index + 1), ""));
const std::vector<std::string> bindings =
si.GetStringList(category, TinyString::FromFormat("AutoFire%u", turbo_button_index + 1));
#ifndef __ANDROID__
// Android doesn't require a binding, since we can trigger it from the touchscreen controller.
if (binding.empty())
if (bindings.empty())
continue;
#endif
@ -1648,7 +1648,7 @@ void CommonHostInterface::UpdateControllerInputMap(SettingsInterface& si)
ts.active = false;
ts.state = false;
if (!binding.empty())
for (const std::string& binding : bindings)
{
std::string_view device, button;
if (!SplitBinding(binding, &device, &button) ||