Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(GamepadManager): Add support for Dualsense/Dualshock controllers #264

Merged
merged 10 commits into from
Oct 19, 2023

Conversation

pastaq
Copy link
Collaborator

@pastaq pastaq commented Sep 23, 2023

  • Adds support for Playstation controllers to be detected/managed by GamepadManager. PS + O combo buttons doesn't work on  #260
  • Adds support for x/y axes who's range starts at 0 and have a positive value midpoint.
  • Replaces DeviceHider with SDL_JOYSTICK_HIDAPI environment variable.
  • Adds general controllers settings menu.
  • Bug Fix: Launching Steam in overlay mode will no longer hold up the main thread.
  • Adds GUT test for normalized axes.

core/systems/input/gamepad_manager.gd Outdated Show resolved Hide resolved
core/systems/input/gamepad_manager.gd Outdated Show resolved Hide resolved
core/systems/input/gamepad_manager.gd Outdated Show resolved Hide resolved
@ShadowApex
Copy link
Collaborator

ShadowApex commented Oct 1, 2023

1.) Inputs are still picked up by steam, possibly via HIDRAW/SDL.

Maybe we could try setting SDL_GAMECONTROLLER_IGNORE_DEVICES (or SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT ) when launching Steam? I believe that is how SteamInput works to prevent double input:
godotengine/godot#76045

or this?
https://steamcommunity.com/discussions/forum/1/6516193260176969137/

or SDL_JOYSTICK_HIDAPI_PS4=0?

or SDL_JOYSTICK_HIDAPI=0

@pastaq pastaq force-pushed the pastaq/virtual_controllers branch from 1167805 to b407764 Compare October 12, 2023 04:32
@pastaq pastaq changed the title WIP: fix(GamepadManager): Properly detect virtual devices. feat(GamepadManager): Add support for Dualsense/Dualshock controllers Oct 18, 2023
@pastaq pastaq marked this pull request as ready for review October 18, 2023 04:46
@pastaq pastaq requested a review from ShadowApex October 18, 2023 04:47
@pastaq
Copy link
Collaborator Author

pastaq commented Oct 18, 2023

It might still be worth considering SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT in the future to allow per-controller isolation, but so far this is working well for me.

@pastaq pastaq merged commit 503bd2e into main Oct 19, 2023
2 checks passed
@pastaq pastaq deleted the pastaq/virtual_controllers branch October 19, 2023 02:27
@github-actions
Copy link

🎉 This PR is included in version 0.27.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants