-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
ControlMapper refactoring #17210
ControlMapper refactoring #17210
Conversation
This is largely working. There's still some non-ideal behavior when trying to control the analog stick from keyboard and a gamepad simultaneously which I'll try to sort out before merge, but other than that, this is ready for review now I think. |
3558139
to
778d9ac
Compare
I tried prototyping multi-mapping on top of this, and it comes out pretty well and quite flexible (including more than 2-inputs combos). Just a little polish left here then I think we can get it in. |
Alright, polish done. Works fine now, and solves an old issue when using both gamepad and keyboard together. |
This will make it easier to implement multi-input combo mappings as in #14793 . This PR doesn't implement it though, only lays the ground work.
Basically, we flip the entire mapping algorithm on its head - instead of taking an input all the way through, we recompute the related outputs from stored inputs on every input change. This will make combos very easy to implement.
Also, analog virtual keys are now more general and handled by the mapper (including conversion of signed axis to unsigned, as required by PS4 controller triggers on DInput), so VIRTKEY_SPEED_ANALOG is now
muchsimpler.