AntiMicroX / antimicrox

Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support.
GNU General Public License v3.0
2.43k stars 141 forks source link

Auto Profile doesn't save to controllers with the same name #734

Open scurvyshroom opened 1 year ago

scurvyshroom commented 1 year ago

Is there an existing issue for this?

Current Behavior

I have four USB encoders, and they each register to their own tab, but they are all named the same. IE, G-Shark GS-GP 702 (Game Controller #) with the numbers being 2, 3, 5 & 6. When creating Auto Profiles through the Settings, the list of available devices show up in order: Controller 1, G-Shark GS-GP 702, G-Shark GS-GP 702, Controller 4, G-Shark GS-GP 702, G-Shark GS-GP 702. Selecting any of the G-Shark options, either through adding a new profile or editing an existing one, saves it to the first G-Shark (controller 2). In the Auto Profile menu, hovering over the device names in the different profiles listed all show the same unique ID number. Selecting to sort by device gives me a single instance of G-Shark GS-GP 702 and All.

Initially I uninstalled and reinstalled AntiMicroX, and the first time I did this one of G-Sharks saved to the intended controller. Ex: I selected the bottom most G-Shark from the device selection and it saved to Controller 6. Hovering over that profile showed a different ID number, and sorting the profiles by device I had G-Shark GS-GP 702, G-Shark GS-GP 702, and All. But trying to save to the second or third G-Shark selection still only saved to the first one.

A couple of more uninstall/reinstalls caused a third G-Shark to save correctly, then a few more uninstall/reinstalls got all four to save individually all with unique ID numbers.

I plugged in another Gamepad, which completely re-ordered the G-Sharks tabs in the main menu, which switched around which profile assigned to each controller. Once again, editing any profile caused it to be saved to the first G-Shark with no ability to create or edit to the other three. I spent about an hour uninstalling/reinstalling with no change this time. I restarted my computer, and upon relaunch of AntiMicroX, three of the four can now be saved to. However, no amount of restarting my machine or uninstalling/reinstalling AnitMicroX seems to give me the ability to save profiles to that fourth controller. And the concern is adding or removing a controller is going to negate all these profiles again.

Expected Behavior

Each controller should be able to have Auto Profiles assigned to it.

Steps To Reproduce

No response

Environment

Program Version 3.3.3
Compiled from packaging: GitHub Windows Release
Built Against SDL 2.0.20
Running With SLD 2.0.20
Using Qt 5.15.2
Using Event Handler: SendInput
Host OS: windows Version: 10 Architecture: x86_64

Anything else?

No response


Upvote & Fund

Fund with Polar

scurvyshroom commented 1 year ago

Turning off then on my machined caused all the profiles to stop working again. I've discovered that all four controllers have the same GUID. It looks like this is the same issue as https://github.com/AntiMicroX/antimicrox/issues/451

After extensive testing, I have determined that the issue is with the lines from the settings file: Controller#########ConfigFile1=name.gamecontroller.amgp

If there are no ConfigFile lines, all four of my controllers have unique GUIDs. If controller #6 has a ConfigFile line, all four have unique GUIDs. If controller #5 has a ConfigFile line, controller #3 becomes the same GUID as controller #2. If controller #3 has a ConfigFile line, controller #5 becomes the same GUID as controller #2. If controller #2 has a ConfigFile line, controller #6 becomes the same GUID as controller #2. If #2 and 3 have ConfigFile lines, 3 and 5 become the same GUID as 2. If #2 and 5 have ConfigFile lines, 3 and 6 become the same GUID as 2. If #2 and 6 have ConfigFile lines, 6 becomes the same GUID as 2. If #3 and 5 have ConfigFile lines, 3 and 5 become the same GUID as 2. If #3 and 6 have ConfigFile lines, 5 becomes the same GUID as 2. If #5 and 6 have ConfigFile lines, 3 becomes the same GUID as 2. If #2, 3 and 5 have ConfigFile lines, 3 5 and 6 become the same GUID as 2. If #2, 3 and 6 have ConfigFile lines, 5 and 6 become the same GUID as 2. If #2, 5 and 6 have ConfigFile lines, 3 and 6 become the same GUID as 2. If #3, 5 and 6 have ConfigFile lines, 3 and 5 become the same GUID as 2. If all four have ConfigFile lines, all four have the same GUID as #2.

It does not seem to matter how many ConfigFile lines there are for each controller nor what order they are put in. I've tested each having 1, 2, 3 and 4. I've created new profiles, changed which profiles are on which controller, and changed auto profiles. I had all four working at one point, so I know that there is some change I can make to get this working, but everything I've tried has consistently worked as outlined above.