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

[Feature Request]: Autoconfig like Retroarch #12222

Open
AngeloScipione opened this issue Jan 19, 2025 · 4 comments
Open

[Feature Request]: Autoconfig like Retroarch #12222

AngeloScipione opened this issue Jan 19, 2025 · 4 comments
Labels
Enhancement / Feature Request FR: Awaiting Consideration The feature request is awaiting a team members consideration.

Comments

@AngeloScipione
Copy link

Description

Add a folder where users can add files that asign raw inputs of a controller (example button "1" or axis "+0") to xinput's names (example "A").
Later, when a user press this button in PCSX2 controllers settings, it will show theses names instead of generic inputs).
Also, Automatic Mapping and PCSX2 ingame menu will use theses inputs.

Reason

  • Make controllers configuration more easy between systems (example SDL conflicts between controllers).
  • Very Upgradable compatibility of controllers (using retroarch's autoconfig compatible is a great sinergy).
  • Improvement performance of automatic mapping and ingame PCS2 menu.

Examples

Retroarch.
Autoconfig github: https://github.com/libretro/retroarch-joypad-autoconfig.

@AngeloScipione AngeloScipione added Enhancement / Feature Request FR: Awaiting Consideration The feature request is awaiting a team members consideration. labels Jan 19, 2025
@Mrlinkwii
Copy link
Contributor

automatic mapping already exists with sdl et al and the pad.ini can be edited if you wish to do so

@AngeloScipione
Copy link
Author

Yes and no. SDL has "named inputs", but it could be wrong in your gamepad. I'll show you a fragment of a input profile's ini:

Cross = SDL-0/A Cross = SDL-1/B Circle = SDL-0/B Circle = SDL-1/Button23

SDL-0 is right (xbox pad). However, SDL-1 is another pad where you can see "B" instead of "A" and "Button23" (RAW?) instead of "B". In my opinion, it's more user oriented the approach where raw's input is translated to "named inputs" that later are used by controller settings.

ALso, in another issue I suggested use UDEV driver as an option for linux. So, It's a way to add compatibility to this system. Also, If you check retroarch autoconfig's github (is "another project"), you can see a lot more files for UDEV than SDL2.

@TellowKrinkle
Copy link
Member

PCSX2 uses the file game_controller_db.txt in its resources directory to figure out controller mappings. If your controller doesn't automap correctly, you can fix it by adding an entry to that file. If you copy the file from PCSX2's resource directory to your PCSX2 config directory (PCSX2/, not PCSX2/inis), PCSX2 will load it from there so it won't get replaced by updates. Alternatively, you can submit your mappings to https://github.com/mdqinc/SDL_GameControllerDB and they will be added to PCSX2 soon after.

The above link also has directions for how to generate mappings in the "Mapping Tools" section of its readme.

@AngeloScipione
Copy link
Author

Thank you TellowKrinkle. I did as you say and it's works well. I also discover that the custom file "game_controller_db.txt" doesn't need all entries to work. For example, I wrote few lines and other avalaibles pads work. And also It's possible write a previous entry.

However... I discovered that not every controller It's not suitable to merge in SDL_GameControllerDB. For example, Wheel is not suitable (I tried a PS3 one). But, I'm happy to use my custom profiles in my computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement / Feature Request FR: Awaiting Consideration The feature request is awaiting a team members consideration.
Projects
None yet
Development

No branches or pull requests

3 participants