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 in Linux not changing profiles in v3.3.3 and forces default profile #725

Closed rporter220 closed 1 year ago

rporter220 commented 1 year ago

Is there an existing issue for this?

Current Behavior

In AntiMicroX, I have 3 profiles currently setup. One is a blank profile (default), and the other 2 are game-specific profiles that should activate based on the window class of the application.

In 3.3.3, upon launching AntiMicroX the default profile is selected. When clicking into the games that are setup in Auto Profile, the profile does not change. If I manually change the profile and click on the game window AntiMicroX changes the profile back to the default. This is true for any window/profile. If I manually select a profile and as soon as the focus is off the AntiMicroX window, the default profile is automatically selected.

Expected Behavior

In 3.3.2, this worked as expected. Most windows had the blank default profile but when one of the game windows were active, it would switch to the appropriate profile. Outside of this, I could also manually select a profile and click on another window and the manually selected profile would remain active, unless the window was one identified in Auto Profile.

Steps To Reproduce

Auto Profile window class:

  1. Setup Auto Profile default profile
  2. Setup Auto Profile based on windows class
  3. Ensure the Auto Profile configuration is Active
  4. Click on window that matches the window class
  5. Notice the default profile still selected.

Forced Default Profile:

  1. Setup Auto Profile default profile
  2. Setup any other Profiles
  3. Manually select a non-default profile
  4. Click on any window other than AntiMicroX
  5. Notice the default profile has been reselected

Environment

Program Version 3.3.3
Program Compiled on Feb  2 2023 at 03:05:34
Built Against SDL 2.26.2
Running With SDL 2.26.3
Using Qt 5.15.8
Using Event Handler: XTest
Compositor type: x11
Host OS: garuda Version: unknown Architecture: x86_64

Anything else?

No response

pktiuk commented 1 year ago

I could not reproduce this issue

I created two autoprofiles (one default and one for vscode).
When I was switching between gedit and code I could see that windows switch.
obraz

Logs also look fine

🟢INFO  "Active window changed to: Title = \"Dokument bez tytu\u001B-B�u 1 - gedit\", Class = \"gedit Gedit\", Program = \"\" or \"\"."
🟢INFO  Change joystick  "PS4 Controller"  profile to:  "/home/pawel/ps4.gamecontroller.amgp"

What do you see in your logs? (--log-level info)

rporter220 commented 1 year ago

So I may have had something weird in my config.

I downgraded to 3.3.2 so I could be working again, but after your post I upgraded back to 3.3.3 and saw the same behavior. Even tho my profiles were listed in the dropdown, I clicked "Load" and loaded each profile and now the Auto Profile switching is working for me in 3.3.3.

To be sure I was good to go, I also deleted my .ini file from ~/.config/antimicrox and re-setup my app settings and Auto Profile settings and it seems to be working normally, even after a reboot etc.

Thank You for responding, and sorry for raising an issue for an apparent config issue.