You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Allow all gamepad devices for built-in ui_* input actions
This allows all controllers to navigate the UI, which enhances compatibility with PC handhelds when external controllers are connected. Previously, only the first device was allowed to use `ui_*` actions out of the box, which means that on a PC handheld, external controllers couldn't navigate the UI (since the first ID is always the built-in controller).
This commit is contained in:
@@ -527,10 +527,8 @@ void InputEventConfigurationDialog::_input_list_item_selected() {
|
||||
} break;
|
||||
case INPUT_JOY_BUTTON: {
|
||||
JoyButton idx = (JoyButton)(int)selected->get_meta("__index");
|
||||
Ref<InputEventJoypadButton> jb = InputEventJoypadButton::create_reference(idx);
|
||||
|
||||
// Maintain selected device
|
||||
jb->set_device(_get_current_device());
|
||||
Ref<InputEventJoypadButton> jb = InputEventJoypadButton::create_reference(idx, _get_current_device());
|
||||
|
||||
_set_event(jb, jb, false);
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user