Skip to content

Input.is_joy_known(device: int) now returns 'false' in Godot 4.5. Where Input.is_joy_known(0) use to return 'true' with xbox controller connected. #111176

@sjharb

Description

@sjharb

Tested versions

Tested in v4.5.stable.official [876b290]

System information

Windows 11

Issue description

Input.is_joy_known(device: int) now returns 'false' in Godot 4.5.
I have tested with both generic wired Xbox controllers and Bluetooth wireless official Xbox controller
Previously Input.is_joy_known used to return 'true' with Generic Xbox controller connected.
Now in Godot 4.5 Input.is_joy_known returned 'false'.
In Windows 11 devices settings the Genetic Xbox wired controller it shows as 'Controller'.
In Windows 11 devices settings the Official Wireless Bluetooth Xbox controller shows as 'Xbox Wireless Controller'
Removing the check for Input.is_joy_known in my code/game fixed the issue for me, but I don't know why it is now returning 'false' instead of 'true'.

Side note: Godot Control nodes still got input from the controllers without issue. But my custom controller connection logic was broken when upgrading to Godot 4.5.

Steps to reproduce

Connect an Xbox controller to your computer.

Add a signal:
var _err = Input.connect("joy_connection_changed", Callable(self, "on_joy_connection_changed"))

Create a function:

func on_joy_connection_changed(device_id: int, is_joy_connected: bool):
  if Input.is_joy_known(device_id):
    print("Input.is_joy_known = true")
  else:
    print("Input.is_joy_known = false")

Expected:
My Xbox controller(s) should return 'true' when checking Input.is_joy_known(device_id).
Actual:
My Xbox controller(s) returned 'false' when checking Input.is_joy_known(device_id).

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Unassessed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions