mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-05-09 14:45:43 -04:00
CommonHostInterface: Use string list for autofire bindings
Fixes autofire bindings on Android.
This commit is contained in:
parent
08876d132f
commit
e8a21d32dc
@ -1620,12 +1620,12 @@ void CommonHostInterface::UpdateControllerInputMap(SettingsInterface& si)
|
|||||||
if (button_name.empty())
|
if (button_name.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const std::string binding(
|
const std::vector<std::string> bindings =
|
||||||
si.GetStringValue(category, TinyString::FromFormat("AutoFire%u", turbo_button_index + 1), ""));
|
si.GetStringList(category, TinyString::FromFormat("AutoFire%u", turbo_button_index + 1));
|
||||||
|
|
||||||
#ifndef __ANDROID__
|
#ifndef __ANDROID__
|
||||||
// Android doesn't require a binding, since we can trigger it from the touchscreen controller.
|
// Android doesn't require a binding, since we can trigger it from the touchscreen controller.
|
||||||
if (binding.empty())
|
if (bindings.empty())
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1648,7 +1648,7 @@ void CommonHostInterface::UpdateControllerInputMap(SettingsInterface& si)
|
|||||||
ts.active = false;
|
ts.active = false;
|
||||||
ts.state = false;
|
ts.state = false;
|
||||||
|
|
||||||
if (!binding.empty())
|
for (const std::string& binding : bindings)
|
||||||
{
|
{
|
||||||
std::string_view device, button;
|
std::string_view device, button;
|
||||||
if (!SplitBinding(binding, &device, &button) ||
|
if (!SplitBinding(binding, &device, &button) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user