libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.24k stars 1.83k forks source link

Controllers are assigning to the wrong ports #17113

Open KamiLordus opened 1 day ago

KamiLordus commented 1 day ago

Description

I have two controllers connected to my PC in Windows 11:

Unfortunately, when I connect these two devices, the system maps the Joystick to port 1 and the pad to port 2. Retroarch recognizes this, just like Windows 11, and it causes a problem. If I change the order of controller mappings in Retroarch, the analogs in the Series X pad will stop working.

Expected behavior

Setting the Xbox Series Controller to Port 1 to be fully functional (working analog sticks, in menus).

Actual behavior

Windows detects the Joystick as Controller 1 and the Xbox Series pad as Controller 2. Retroarch does the same which causes problems.

I will add that the problem only affects the Xbox Series X controller. For example, the Xbox One X controller mapped to port 1 and the problem did not occur (unfortunately it was damaged).

zoltanvb commented 21 hours ago

In general, the order of devices is controlled by the underlying operating system, but now there are some options inside RetroArch. Can you check, if the controller device reservation could solve this issue? https://github.com/libretro/RetroArch/pull/16647

KamiLordus commented 19 hours ago

I've been sitting on this for hours and trying different combinations. Unfortunately, nothing helps, because the analogs in the Series X pad will only work when the Joystick is in port 1 by default.

I even tried a program like devreorder, but for some reason it didn't want to work for me.

zoltanvb commented 19 hours ago

"Nothing helps" includes the scenario when the Series X pad is set up as a reserved device under Port 1 Controls? If so, please generate a log (including retroarch startup and controller connection).

KamiLordus commented 19 hours ago

You can change port 1 to an xbox controller, and port 2 to an xbox controller as well. Then the menu gains full functionality when controlling the pad. But in reality the controller is still in port 2, not 1. And you can control it by enabling the option in Retroarch, which allows all players to control the menu.

It becomes chaos and mess in the very cores. Player 1 is actually 2 and vice versa. Give me a moment for the log

KamiLordus commented 19 hours ago

"Nothing helps" includes the scenario when the Series X pad is set up as a reserved device under Port 1 Controls? If so, please generate a log (including retroarch startup and controller connection).

Exactly. After reserving the xbox controller in port 1, the joystick automatically maps to port 2. However, the analogs in the pad still do not work. retroarch.log

zoltanvb commented 19 hours ago

Weird. Logs reveal no problem. Can you test if the analogs work in Remote Retropad? (Load Core / Start Remote Retropad).

KamiLordus commented 18 hours ago

Start Remote Retropad - hmm, I can't find that option anywhere. It's also strange that the Xbox Series pad analogs also work in games (for example, the Swanstation core). However, I really want them to work in the Retroarch menu as well.

Scrolling through the Retroarch menu with the d-pad is mega-tedious.

I don't know if it has any significance, but the pad is connected via a USB cable. Joystick to PC adapter + USB connection