diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index fe3b01f96..b3549fb7d 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -3707,6 +3707,10 @@ void FullscreenUI::DrawControllerSettingsPage() DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_WIFI, "SDL DualShock 4 / DualSense Enhanced Mode"), FSUI_CSTR("Provides vibration and LED control support over Bluetooth."), "InputSources", "SDLControllerEnhancedMode", false, bsi->GetBoolValue("InputSources", "SDL", true), false); + DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_LIGHTBULB, "SDL DualSense Player LED"), + FSUI_CSTR("Enable/Disable the Player LED on DualSense controllers."), "InputSources", + "SDLPS5PlayerLED", false, bsi->GetBoolValue("InputSources", "SDLControllerEnhancedMode", true), + false); #ifdef _WIN32 DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_COG, "Enable XInput Input Source"), FSUI_CSTR("The XInput source provides support for XBox 360/XBox One/XBox Series controllers."), diff --git a/src/duckstation-qt/controllerglobalsettingswidget.cpp b/src/duckstation-qt/controllerglobalsettingswidget.cpp index 4367eb350..53a1077c9 100644 --- a/src/duckstation-qt/controllerglobalsettingswidget.cpp +++ b/src/duckstation-qt/controllerglobalsettingswidget.cpp @@ -134,6 +134,9 @@ ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, Contro linkButton(m_ui.SDL2LED, 2); linkButton(m_ui.SDL3LED, 3); + SettingsInterface* sif = dialog->getProfileSettingsInterface(); + + ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLPS5PlayerLED, "InputSources", "SDLPS5PlayerLED", false); connect(m_ui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &QDialog::accept); } diff --git a/src/duckstation-qt/controllerledsettingsdialog.ui b/src/duckstation-qt/controllerledsettingsdialog.ui index 87f9aa9c2..8e0c00a1d 100644 --- a/src/duckstation-qt/controllerledsettingsdialog.ui +++ b/src/duckstation-qt/controllerledsettingsdialog.ui @@ -7,7 +7,7 @@ 0 0 501 - 108 + 128 @@ -26,14 +26,14 @@ - - + + - SDL-1 LED + SDL-3 LED - + - + @@ -50,24 +50,53 @@ - - + + - SDL-3 LED + SDL-1 LED - + - + - - - - QDialogButtonBox::Close + + + + QLayout::SetDefaultConstraint - + + 0 + + + + + + 0 + 0 + + + + Enable DualSense Player LED + + + + + + + + 0 + 0 + + + + QDialogButtonBox::Close + + + + diff --git a/src/util/input_manager.cpp b/src/util/input_manager.cpp index f5d14cf68..0720e48b0 100644 --- a/src/util/input_manager.cpp +++ b/src/util/input_manager.cpp @@ -1283,6 +1283,7 @@ void InputManager::SetDefaultSourceConfig(SettingsInterface& si) si.ClearSection("InputSources"); si.SetBoolValue("InputSources", "SDL", true); si.SetBoolValue("InputSources", "SDLControllerEnhancedMode", false); + si.SetBoolValue("InputSources", "SDLPS5PlayerLED", false); si.SetBoolValue("InputSources", "XInput", false); si.SetBoolValue("InputSources", "RawInput", false); } diff --git a/src/util/sdl_input_source.cpp b/src/util/sdl_input_source.cpp index b1d1c9e88..4053aeb5f 100644 --- a/src/util/sdl_input_source.cpp +++ b/src/util/sdl_input_source.cpp @@ -173,6 +173,7 @@ bool SDLInputSource::Initialize(SettingsInterface& si, std::unique_lock& settings_lock) { const bool old_controller_enhanced_mode = m_controller_enhanced_mode; + const bool old_controller_ps5_player_led = m_controller_ps5_player_led; #ifdef __APPLE__ const bool old_enable_iokit_driver = m_enable_iokit_driver; @@ -188,7 +189,9 @@ void SDLInputSource::UpdateSettings(SettingsInterface& si, std::unique_lock