Logitech G-UF13A controller right joystick not working properly

I want to use my controller in retroarch to play some games but the right joystick can’t go left and right, I’m sure this is a software problem because it works fine on macOS but not on Fedora. If anyone has a solution or can help that would be appreciated. Thanks.

Okay it turns out the whole problem was wayland. Everything works on xorg. The problem is only on wayland. If anyone knows how to fix it on wayland then that would be useful but for now I’ll be using xorg since it works well. Good to know I found a solution to this at least.