diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index d9fd5ce73..93c7a5611 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -478,6 +478,7 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings) if (m_system && !controllers_updated) { m_system->UpdateControllers(); + m_system->ResetControllers(); UpdateSoftwareCursor(); controllers_updated = true; } diff --git a/src/core/system.cpp b/src/core/system.cpp index ceb997fa3..27878c4d6 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -850,6 +850,16 @@ void System::UpdateControllerSettings() } } +void System::ResetControllers() +{ + for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++) + { + Controller* controller = m_pad->GetController(i); + if (controller) + controller->Reset(); + } +} + void System::UpdateMemoryCards() { const Settings& settings = m_host_interface->GetSettings(); diff --git a/src/core/system.h b/src/core/system.h index a8cfb5349..0116169b9 100644 --- a/src/core/system.h +++ b/src/core/system.h @@ -140,6 +140,7 @@ public: Controller* GetController(u32 slot) const; void UpdateControllers(); void UpdateControllerSettings(); + void ResetControllers(); void UpdateMemoryCards(); bool HasMedia() const; diff --git a/src/duckstation-libretro/libretro_host_interface.cpp b/src/duckstation-libretro/libretro_host_interface.cpp index 6088cb2b5..38e40e446 100644 --- a/src/duckstation-libretro/libretro_host_interface.cpp +++ b/src/duckstation-libretro/libretro_host_interface.cpp @@ -448,7 +448,7 @@ static std::array s_option_definitions = {{ {"PlayStationMouse", "PlayStation Mouse"}, {"NeGcon", "NeGcon"}}, "DigitalController"}, - {"Controller1.Type", + {"Controller1.AutoEnableAnalog", "Controller 1 Auto Analog Mode", "Automatically enables analog mode in supported controllers at start/reset.", {{"true", "Enabled"}, {"false", "Disabled"}}, @@ -463,7 +463,7 @@ static std::array s_option_definitions = {{ {"PlayStationMouse", "PlayStation Mouse"}, {"NeGcon", "NeGcon"}}, "None"}, - {"Controller2.Type", + {"Controller2.AutoEnableAnalog", "Controller 2 Auto Analog Mode", "Automatically enables analog mode in supported controllers at start/reset.", {{"true", "Enabled"}, {"false", "Disabled"}},