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?
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.
//FScopeLock Lock(&GamepadAndUserCS);
for (auto controllerstate : ControllerStates)
{
if (controllerstate.ControllerRef != nullptr)
{
isGamepadAttached = true;
break;
}
}
}
return isGamepadAttached;
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.