-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[Input] Get mapped joy events for joypad #100791
base: master
Are you sure you want to change the base?
Conversation
5ce890e
to
ee48457
Compare
@akien-mga: Could I get a review on this, please? :) |
People are just coming back from the holidays, most people were either still away or just coming back last week, people should be able to review this in the following week |
@AThousandShips as the feature freeze has been put in place, can we get this queued for 4.5, please…? |
It'll be put on a specific milestone when reviewed, for example 4.5, but not before, the relevant teams have been notified but we're busy with 4.4 so will probably not be a priority until after releasing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally on Linux, it works as expected.
Xbox One Elite 2 Controller
["a", "b", "x", "y", "back", "guide", "start", "leftstick", "rightstick", "leftshoulder", "rightshoulder", "dpup", "dpdown", "dpleft", "dpright"]
["leftx", "lefty", "rightx", "righty", "lefttrigger", "righttrigger"]
However, if your goal is to show correct button prompts or gamepad images, I think #89193 is more suited. There isn't a lot of variance in buttons across modern controllers nowadays. I think the only exception that really matters in games are the lack of analog triggers on Switch controllers (which #89193 can take into account).
Personally, I would prefer #89193 to be merged first, then wait and see if we really need to do something more before we go forward with this PR.
Thanks, didn't know about that PR :) |
@Calinou: after looking at that PR, I must say it does not satisfy my requirements. Moreover, relying on the device name is not reliable at all (depending on the OS/driver, you get different names for the same device), though I still see value in the other PR in the sense that it helps me localizing the button/axes names, provided all the constant strings are visibly documented outside the codebase. In that sense, I'd say the two PRs actually harmonize with each other. EDIT: Just to give a bit more context, I also want to provide several joypad button/axes to action default mappings, then auto-select the most fitting one on first connect (and more supporting features) |
I'm still undecided on this. I haven't seen much prior art of this in other engines/games where things like paddles are detected and bound automatically if present. |
Fair enough. Though I would also use this code to give warnings if their connected joypad does not have some mandatory/preferred buttons/axes, e.g. has only one (or none) joystick and 2 are required (or preferred) - I know most have them, but some people like using retro controllers whenever possible. Until this PR's future is decided I can do a custom build, keeping this change compatible is easy enough. |
Get the buttons and axes mapped to the connected joypad w/o having to use them all.
Motivation behind this PR:
JOY_BUTTON_PADDLE_*
, some don't. Some don't haveJOY_BUTTON_MISC1
, orJOY_AXIS_RIGHT_*
, etc.See attached test project:
joypad-event-test.zip
Output for my joypad using the test project: