IsGamepadAttached() doesn’t work on Xbox One? I using the GenericApplication function like i did on the PS4(Worked 100%) and on PC but it always returns false on Xbox One (With the controller connected and disconnected).
Maybe the interface for the generic function was not made but someone knows a way around this?
I found the same issue in version 4.21.2
The implementation is:
bool FXboxOneInputInterface::IsGamepadAttached() const
for (auto DeviceIt = ExternalInputDevices.CreateConstIterator(); DeviceIt; ++DeviceIt)
Unfortunately that ExternalInputDevices is always empty. I tried to understand what is an “ExternalInputDevice” but I don’t think it refers to gamepad.
I patched the code with this:
bool isGamepadAttached = false;
// Should call this, but the function is const.
for (auto controllerstate : ControllerStates)
if (controllerstate.ControllerRef != nullptr)
isGamepadAttached = true;
I hope is not too risky to call it without the critical section.
It would be great if the Epic Guys verify this and in case implement a more elegant solution.