mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-17 22:25:37 +00:00
InputManager: Don't load bindings for inactive multitap ports
This commit is contained in:
parent
c656f5cbd7
commit
16d15f5c65
|
@ -267,6 +267,10 @@ struct Settings
|
|||
{
|
||||
return (multitap_mode == MultitapMode::Port1Only || multitap_mode == MultitapMode::BothPorts);
|
||||
}
|
||||
ALWAYS_INLINE bool IsMultitapPortEnabled(u32 port) const
|
||||
{
|
||||
return (port == 0) ? IsPort1MultitapEnabled() : IsPort2MultitapEnabled();
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static bool IsPerGameMemoryCardType(MemoryCardType type)
|
||||
{
|
||||
|
|
|
@ -924,6 +924,13 @@ void InputManager::CopyConfiguration(SettingsInterface* dest_si, const SettingsI
|
|||
|
||||
for (u32 port = 0; port < NUM_CONTROLLER_AND_CARD_PORTS; port++)
|
||||
{
|
||||
if (Controller::PadIsMultitapSlot(port))
|
||||
{
|
||||
const auto [mt_port, mt_slot] = Controller::ConvertPadToPortAndSlot(port);
|
||||
if (!g_settings.IsMultitapPortEnabled(mt_port))
|
||||
continue;
|
||||
}
|
||||
|
||||
const std::string section(Controller::GetSettingsSection(port));
|
||||
const std::string type(src_si.GetStringValue(section.c_str(), "Type", Controller::GetDefaultPadType(port)));
|
||||
if (copy_pad_config)
|
||||
|
|
Loading…
Reference in a new issue