Support for third party joycons and xbox orientation#116
Open
lainproliant wants to merge 2 commits intoDanielOgorchock:masterfrom
Open
Support for third party joycons and xbox orientation#116lainproliant wants to merge 2 commits intoDanielOgorchock:masterfrom
lainproliant wants to merge 2 commits intoDanielOgorchock:masterfrom
Conversation
This allows the use of third-party joycons like the Binbok which misidentify themselves as Switch Pro Controllers but otherwise work just fine.
lainproliant
commented
Jan 27, 2023
| @@ -0,0 +1,3 @@ | |||
| mac_device 98:B6:E9:F8:6F:86 Left_Joycon | |||
Author
There was a problem hiding this comment.
This is the config file I'm currently using.
lainproliant
commented
Jan 27, 2023
|
|
||
| subscriber = std::make_shared<epoll_subscriber>(std::vector({udev_mon_fd}), | ||
| [=](int event_fd){epoll_event_callback(event_fd);}); | ||
| [=, this](int event_fd){epoll_event_callback(event_fd);}); |
Author
There was a problem hiding this comment.
Implicit capture of this is deprecated in C++20, so I went ahead and updated it here and other places where this is captured in lambdas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These two commits add the following:
/etc/joycond.confconfig file allowing for the following:mac_devicedirective allowing the device type to be overridden on a per-MAC basis. This allows the usage of third-party joycons such as the Binbok that report their device type incorrectly.propdirective allowing settings for combined joycons to be specified.xbox_orientationproperty swapping X/Y and A/B, making the combined controller behave more like an XBOX controller, preventing the need for remapping in many games that expect this button orientation.Please let me know your thoughts. I included my
moonlightutility lib mainly forshlex::splitwhich is used in parsing the config file, but I can refactor this out if you'd prefer. I'm happy to follow any suggestions and make changes. Thanks for building and maintaining this awesome daemon!