-
Notifications
You must be signed in to change notification settings - Fork 340
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
used serial_number to identify and set type to a specific device #663
Conversation
3rd party joycons (tested on joysky "wireless controller for N/SW) reported the same name "wireless gamepad" so i was unable to correcly address the left/right type of joycon. By using bluetooth serial number as additional identifier we can target specific device with correct type. Changes: - used serial_number as additional condition in "check list of custom controllers specified" block - SController now incapsulate serial_number and use it for hash, equals, serialize etc - Read the 5 index of 3rdPartyController file on _3rdPartyControllers
Nice one! Very clean commit adhering to the set code style of the repo. Glad the 3rd party support is slowly getting there. If it's not a bother, could you compile the latest master (with your pushed changes) and reply to those issues you linked with a build for them to try out? To see if it resolves their problems? |
Of course. I will post the build also here for future reference. P.S. For 3rd party support i also had to change the "BetterJoyForCemu.exe.Config" file to set"NonOriginalController" to value="DefaultCalibration" (as suggested here). |
I tried out the build with all 3 NonOriginalController settings
I used debug 1 and get the following output when it's left to default. I have the PowerA Wireless gamecube controller this is what shows in the 3rdpartycontrollers file, |
having retried all the options, defaultcontroller actually causes the same issue as default now, not sure what changed the behaviour though. I tried with and without rumble and with and without homeLED enabled, same issue. |
I'm not sure why a Gamecube controller would even have a chance of working? Surely it's not seen as a Pro controller (as it wouldn't have gyro/accel and would have analogue triggers). EDIT: I take back the gyro/accel bit. It doesn't however support HD rumble, so maybe something breaks there? |
The gamecube controller acts as and is seen as a pro controller on the switch. It also has digital triggers instead of analogue, and like you mention in the edit does have gyro/accel but as you point out it lacks any rumble feature so it does seem plausible that the issue lies there. The controller works on steam using the nintendo controller configuration and can use gyro if that provides any additional info. If theres anything you can think of me doing to try to get more info about the controller that could be useful don't hesitate to ask. |
I took a look at this. The It stops reacting when you try to blink the lights, so maybe comment out these two lines https://github.com/Davidobot/BetterJoy/blob/master/BetterJoyForCemu/Joycon.cs#L422 Maybe it needs to be manually paired via BT? Though I'm not sure. If the above doesn't work, try changing https://github.com/Davidobot/BetterJoy/blob/master/BetterJoyForCemu/Joycon.cs#L374 to !isUSB |
so I changed if (form.nonOriginal) {
enumerate.product_id = product_pro;
} to if (form.nonOriginal) {
enumerate.product_id = product_pro;
if (enumerate.product_string == "Wireless Gamepad" && enumerate.manufacturer_string == "Nintendo")
enumerate.vendor_id = vendor_id;
} and this makes my controller get detected in nonOriginal mode (defaultCalibration) without having to add it to the third party menu. I tried blanking out those two LED lines and it doesn't really seem to change much from what I can tell. I tried the !isUSB change too and the controller just drops and then auto reconnects repeatedly. I also noticed then when I turn rumble to false it apparently still tries to use rumble, but instead of simply dropping the controller it instead gives an error about the feedback received Debug log with the 2 lines you suggested to cut out and the lines I posted above
Debug Log with rumble disabled
The Error
|
I have the Power A Enhanced Wireless Swicth controller. Just tried this build after talking to David. My controller is detected but only for a few seconds before being dropped and turning off. If I turn it back on it is detected again (as a different player [1-4]) then drops again. I have tried with each of the 3 modes in Third Party config settings. The only one that the controller pairs at all in is Disabled. All the others it wont connect at all. It seems like great progress though! |
…idobot#663) 3rd party joycons (tested on joysky "wireless controller for N/SW) reported the same name "wireless gamepad" so i was unable to correcly address the left/right type of joycon. By using bluetooth serial number as additional identifier we can target specific device with correct type. Changes: - used serial_number as additional condition in "check list of custom controllers specified" block - SController now incapsulate serial_number and use it for hash, equals, serialize etc - Read the 5 index of 3rdPartyController file on _3rdPartyControllers
This fixes the ability to change the type of a 3rd party JoyCon as described also here.
I noticed that 3rd party joycons (in my case joysky "wireless controller for N/SW") reported the same name "wireless gamepad" and vendor id to windows for Left and Right Joycon.
BetterJoy is using this args for generating a unique id for 3rdParty configuration that results the same for Left/Right.
3rdPartyControllers file content in 6.4a version:
Wireless Gamepad|1406|8201|2
Wireless Gamepad|1406|8201|3
3rdPartyControllers file content in current master:
Wireless Gamepad(1406-8201)|1406|8201|2
Wireless Gamepad(1406-8201)|1406|8201|3
In both cases the first joycon is assigning 2 as type to the other joycon.
By using bluetooth serial number as additional identifier we can target specific device with correct type:
Wireless Gamepad(1406-8201-98b6e99a9c77)|1406|8201|2|98b6e99a9c77
Wireless Gamepad(1406-8201-98b6e904ea9e)|1406|8201|3|98b6e904ea9e
Changes:
This pull request in addition to "NonOriginalController"="DefaultCalibration" (as suggested here) fixed my 3rdParty joycons.
P.S. This is my first attempt on C#, so be kind to me and I'm opened toy suggestions.