Skip to content

Commit

Permalink
SDLInputSource: Adjust default hint settings & use auto when enabling…
Browse files Browse the repository at this point in the history
… enhanced reports
  • Loading branch information
TheLastRar committed Mar 2, 2025
1 parent f60e103 commit b614883
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pcsx2-qt/Settings/ControllerGlobalSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
SettingsInterface* sif = dialog->getProfileSettingsInterface();

ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLSource, "InputSources", "SDL", true);
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLEnhancedMode, "InputSources", "SDLControllerEnhancedMode", false);
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLEnhancedMode, "InputSources", "SDLControllerEnhancedMode", true);
connect(m_ui.enableSDLSource, &QCheckBox::checkStateChanged, this, &ControllerGlobalSettingsWidget::updateSDLOptionsEnabled);
connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked);

Expand Down Expand Up @@ -146,7 +146,7 @@ ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, Contro

SettingsInterface* sif = dialog->getProfileSettingsInterface();

ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLPS5PlayerLED, "InputSources", "SDLPS5PlayerLED", false);
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLPS5PlayerLED, "InputSources", "SDLPS5PlayerLED", true);
connect(m_ui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &QDialog::accept);
}

Expand Down
6 changes: 3 additions & 3 deletions pcsx2/ImGui/FullscreenUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4433,11 +4433,11 @@ void FullscreenUI::DrawControllerSettingsPage()
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_COG, "Enable SDL Input Source"),
FSUI_CSTR("The SDL input source supports most controllers."), "InputSources", "SDL", true, true, false);
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,
FSUI_CSTR("Provides vibration and LED control support over Bluetooth."), "InputSources", "SDLControllerEnhancedMode", true,
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);
FSUI_CSTR("Enable/Disable the Player LED on DualSense controllers."), "InputSources", "SDLPS5PlayerLED", true,
bsi->GetBoolValue("InputSources", "SDLControllerEnhancedMode", true), true);
#ifdef _WIN32
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_COG, "SDL Raw Input"), FSUI_CSTR("Allow SDL to use raw access to input devices."),
"InputSources", "SDLRawInput", false, bsi->GetBoolValue("InputSources", "SDL", true), false);
Expand Down
6 changes: 3 additions & 3 deletions pcsx2/Input/SDLInputSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ void SDLInputSource::LoadSettings(SettingsInterface& si)

m_sdl_hints = si.GetKeyValueList("SDLHints");

m_enable_enhanced_reports = si.GetBoolValue("InputSources", "SDLControllerEnhancedMode", false);
m_enable_ps5_player_leds = si.GetBoolValue("InputSources", "SDLPS5PlayerLED", false);
m_enable_enhanced_reports = si.GetBoolValue("InputSources", "SDLControllerEnhancedMode", true);
m_enable_ps5_player_leds = si.GetBoolValue("InputSources", "SDLPS5PlayerLED", true);
m_use_raw_input = si.GetBoolValue("InputSources", "SDLRawInput", false);

#ifdef __APPLE__
Expand Down Expand Up @@ -545,7 +545,7 @@ void SDLInputSource::SetHints()
}

SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, m_use_raw_input ? "1" : "0");
SDL_SetHint(SDL_HINT_JOYSTICK_ENHANCED_REPORTS, m_enable_enhanced_reports ? "1" : "0"); // PS4/PS5 Rumble
SDL_SetHint(SDL_HINT_JOYSTICK_ENHANCED_REPORTS, m_enable_enhanced_reports ? "auto" : "0"); // PS4/PS5 Rumble
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, m_enable_ps5_player_leds ? "1" : "0");
// Enable Wii U Pro Controller support
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1");
Expand Down
4 changes: 2 additions & 2 deletions pcsx2/SIO/Pad/Pad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ void Pad::SetDefaultControllerConfig(SettingsInterface& si)
InputManager::InputSourceToString(static_cast<InputSourceType>(i)),
InputManager::GetInputSourceDefaultEnabled(static_cast<InputSourceType>(i)));
}
si.SetBoolValue("InputSources", "SDLControllerEnhancedMode", false);
si.SetBoolValue("InputSources", "SDLPS5PlayerLED", false);
si.SetBoolValue("InputSources", "SDLControllerEnhancedMode", true);
si.SetBoolValue("InputSources", "SDLPS5PlayerLED", true);
si.SetBoolValue("Pad", "MultitapPort1", false);
si.SetBoolValue("Pad", "MultitapPort2", false);
si.SetFloatValue("Pad", "PointerXScale", 8.0f);
Expand Down

0 comments on commit b614883

Please sign in to comment.