Repository: godot
Issue: Xbox Wireless Controller over bluetooth axis mixed up
Labels: bug,platform:windows,needs testing,topic:input

### Tested versions

- Reproducable in v4.1, v4.2, 4.3-dev

### System information

Godot v4.2.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6700 XT (Advanced Micro Devices, Inc.; 31.0.14043.7000) - AMD Ryzen 9 3900X 12-Core Processor (24 Threads)

### Issue description

I have two Xbox Wireless Controllers (Model 1704, Xbox One S Controller) connected via bluetooth to my PC.
Because I had issues with the controllers introducing stutters in God of War (PC) I connected them via USB and updated the firmware via the Xbox Accessories app from `v3.x` to `v5.17.3202.0`.

The update removed the stuttering in GoW but unfortunately some games (Hammerwatch series for example) and also Godot now mix up some axis and buttons **when Godot editor / game is focused**.

The mixed up axis are:
- Move right stick left: `Joypad Axis 1 - (Left Stick Up, Joystick 0 up)`
- Move right stick up: `Joypad Axis 4 - (Joystick 2 Left)`
- Move right stick right: `Joypad Axis 3 + (Right Stick Down, Joystick 1 Down)`
- Move right stick down: `Joypad Axis 4 + (Left Trigger, Sony L2, Xbox LT, Joystick 2 Right)`
- Press left trigger: `Joypad Axis 2 + (Right Stick Right, Joystick 1 Right)`
- Press right trigger: `Joypad Axis 2 - (Right Stick Left, Joystick 1 Left)`

The mixed up buttons are:
- Press left shoulder: `Joypad Button 4 (Back, Sony Select, Xbox Back, Nintento -)`
- Press right shoulder: `Joypad Button 5 (Guide, Sony PS, Xbox Home)`
- Press select: `Joypad Button 6 (Start, Xbox Menu, Nintendo +)`
- Press start: `Joypad Button 7 (Left Stick, Sony L3, Xbox L/LS)`
- Press left stick: `Joypad Button 8 (Right Stick, Sony R3, Xbox R/RS)`
- Press right stick: `Joypad Button 9 (Left Shoulder, Sony L1, Xbox LB)`

All other axis / buttons work fine.
When connecting the controllers via USB cable, everything is fine.
When Godot editor / game is unfocused, everything is fine (this is really strange to me).

The controllers are listed as `Bluetooth LE XINPUT-compatible input device (VID: 045E, PID: 0B20)` when connected over bluetooth and as `XINPUT-compatible HID-device (VID: 045E, PID: 02FF)` when connected via cable.

I've also tried to add the controllers to the list of known xinput devices in `joypad_windows.cpp - JoypadWindows::is_xinput_device` but the GUID changes everytime the game / editor process is restarted.
I've added a manual check for only PID and VID so xinput is forced but then no inputs are recognized at all which confused me because in theory, those devices should be used via xinput instead of dinput.

I'm a bit lost here now but maybe there is something wrong with mapping inputs to the axis / buttons somewhere?


### Steps to reproduce

 - Have an Xbox Wireless Controller
 - Connect via USB to PC
 - Open Xbox Accessories app
 - Click on "three dots" button
 - Update firmware to v5.17+
 - Disconnect USB cable
 - Reconnect via bluetooth
 - Open any Godot project (v4.1+ but might be lower versions as well, not tested)
 - Open project settings
 - Click input tab
 - Add new input binding
 - Try to configure input actions for right stick / triggers / buttons listed above
 - See that they are all mixed up
 - Click outside of Godot window, i.e. Desktop
 - Press the same inputs again and see that they're recognized correctly





### Minimal reproduction project (MRP)

[XInput_GD3.zip](https://github.com/godotengine/godot/files/13924966/XInput_GD3.zip)
[XInput_GD4.zip](https://github.com/godotengine/godot/files/13924967/XInput_GD4.zip)