Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor input config and reporting (CHANGES INPUTS)
Note that this is a change which changes which inputs and in what order. This commit is a significant refactor of the code responsible for configuring and reporting inputs from the devices. The original driver code was designed around the Joy-Cons and then the Pro Controller, which had enough in common that they could share several abstractions. With the addition of the NSO controllers, these abstractions no longer make sense. I've been planning to do this for a while. Below is a list of changes. * The `input_dev` field was sometimes called `input` and sometimes called `dev`. I've changed it to `idev` throughout to be consistent and to match with `hdev`. * `nx_con_device_is_any_joycon` no longer has any use since the abstractions which apply to both Joy-Cons are gone. * Some functions have been renamed (like `nx_con_parse_imu_report`) to be slightly more consistent with the overall pattern. There are probably more renames I'd like to do. * `nx_con_parse_report` was broken up into several functions. This forms a pattern that mirrors the one I added in `nx_con_input_create`. * `nx_con_input_create` was also broken up, forming the pattern I just mentioned in the last point. (It stands to reason this pattern would serve to allow me to break this code into several source files, but I am not eager to do that yet.) * Some reformatting was done (alignment fixes and such). * BREAKING CHANGE: Home and Capture buttons were all mapped to `BTN_0` and `BTN_1`, respectively. * FIX: The right Joy-Con SL and SR buttons were not properly configured. This has been corrected. * Some debugging statements were removed.
- Loading branch information