Skip to content
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

The wrong autoconfig file is matched (weighted score system) #1933

Closed
kivutar opened this issue Jul 9, 2015 · 12 comments
Closed

The wrong autoconfig file is matched (weighted score system) #1933

kivutar opened this issue Jul 9, 2015 · 12 comments

Comments

@kivutar
Copy link
Member

kivutar commented Jul 9, 2015

Depending in what order the input autoconfig files are read, you will get a wrong config.

For example, if Xbox_360_Wireless_Receiver.cfg is read before Microsoft_X-Box_360_pad.cfg, you will get the Xbox_360_Wireless_Receiver for your Microsoft_X-Box_360_pad. Because input_autoconfigure_joypad_from_conf_dir will get the first config with a matching vid:pid, and those two config files share the same vid:pid.

To fix that, we must give priority to the file that matches the name:vid:pid triplet, and then fallback to file that matches just vid:pid, and finally to file that matches just the name.

Every config file that does not match the input_driver must be ignored, as it is already the case.

@sergiobenrocha2
Copy link
Contributor

Xbox_360_Wireless_Receiver has no more the same id, I think that one was from the joystick recharger, not from the receiver.

@andres-asm
Copy link
Contributor

kivutar, check it now, I made a weighted score system it works nicely here

On Thu, Jul 9, 2015 at 11:42 PM, sergio-br2 notifications@github.com
wrote:

Xbox_360_Wireless_Receiver has no more the same id, I think that one was
from the joystick recharger, not from the receiver.


Reply to this email directly or view it on GitHub
#1933 (comment)
.

@kivutar
Copy link
Member Author

kivutar commented Jul 10, 2015

@fr500 your weighted score system fixes that bug. Thanks.
@sergiobenrocha2 are you sure? Your receiver is the official one?

@kivutar kivutar closed this as completed Jul 10, 2015
@sergiobenrocha2
Copy link
Contributor

@kivutar take a look at libretro/retroarch-joypad-autoconfig#38, I posted some photos there. I think it's the official, but I'm not sure.

Bus 008 Device 003: ID 045e:0719 Microsoft Corp. Xbox 360 Wireless Adapter

@sergiobenrocha2
Copy link
Contributor

My receive is getting the config from both Xbox_360_Wireless_Receiver.cfg and Xbox_360_Wireless_Receiver_Chinese01.cfg (I mv one, and it get from the other)

@sergiobenrocha2
Copy link
Contributor

With both config installed, it get from the wrong one (Chinese01, which has product id = 657)

my receiver has product ID = 1817

@andres-asm
Copy link
Contributor

the pid/vid must be expressed in decimal format

@andres-asm
Copy link
Contributor

If you can paste a verbose log I can try to figure out why it's picking the wrong one

@sergiobenrocha2
Copy link
Contributor

I git pull, it's working now, sorry.

Btw, 1817 is the decimal of 0719.

@sergiobenrocha2
Copy link
Contributor

I removed the Xbox_360_Wireless_Receiver.cfg, and it's fallbacking to Xbox_360_Wireless_Receiver_Chinese01.cfg. Is it right?

@kivutar
Copy link
Member Author

kivutar commented Jul 11, 2015

Falling back is normal, because both config files and devices share the same input_device.

If you compare the two files, you will see that the only difference is the pid and the L and R recognized either as axis or buttons. As you expressed on the other topic.

Most important, is it working now?

@sergiobenrocha2
Copy link
Contributor

Yup, it's working fine now.

@inactive123 inactive123 changed the title The wrong autoconfig file is matched The wrong autoconfig file is matched (weighted score system) Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants