mirror of
https://github.com/stenzek/duckstation.git
synced 2026-07-11 01:24:11 +02:00
InputManager: Fix cloning multitap profiles
This commit is contained in:
@@ -419,19 +419,6 @@ struct Settings : public GPUSettings
|
||||
return audio_output_muted ? 0 : (fast_forwarding ? audio_fast_forward_volume : audio_output_volume);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE bool IsPort1MultitapEnabled() const
|
||||
{
|
||||
return (multitap_mode == MultitapMode::Port1Only || multitap_mode == MultitapMode::BothPorts);
|
||||
}
|
||||
ALWAYS_INLINE bool IsPort2MultitapEnabled() const
|
||||
{
|
||||
return (multitap_mode == MultitapMode::Port2Only || multitap_mode == MultitapMode::BothPorts);
|
||||
}
|
||||
ALWAYS_INLINE bool IsMultitapPortEnabled(u32 port) const
|
||||
{
|
||||
return (port == 0) ? IsPort1MultitapEnabled() : IsPort2MultitapEnabled();
|
||||
}
|
||||
|
||||
/// Returns the default type for the specified port.
|
||||
ALWAYS_INLINE static ControllerType GetDefaultControllerType(u32 pad)
|
||||
{
|
||||
|
||||
@@ -1702,12 +1702,17 @@ void InputManager::CopyConfiguration(SettingsInterface* dest_si, const SettingsI
|
||||
#endif
|
||||
}
|
||||
|
||||
const MultitapMode mtap_mode =
|
||||
Settings::ParseMultitapModeName(
|
||||
(copy_pad_config ? &src_si : dest_si)->GetStringViewValue("ControllerPorts", "MultitapMode"))
|
||||
.value_or(g_settings.multitap_mode);
|
||||
const auto mtap_enabled = Controller::GetMultitapEnabledPorts(mtap_mode);
|
||||
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))
|
||||
if (!mtap_enabled[mt_port])
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user