leafwing_input_manager::user_input::gamepad

Function find_gamepad

source
pub fn find_gamepad(gamepads: &Gamepads) -> Gamepad
Expand description

Retrieves the first connected gamepad.

If no gamepad is connected, a synthetic gamepad with an ID of 0 is returned.