carb::input::subscribeToGamepadConnectionEvents

Defined in carb/input/InputUtils.h

template<typename Functor>
inline SubscriptionId carb::input::subscribeToGamepadConnectionEvents(IInput *input, Functor &&functor)

Subscribes to the gamepad connection event stream.

Note

Once subscribed functor is called for all previously created gamepads.

Parameters
  • input – The IInput interface.

  • functor – An invocable object to be called on each gamepad event. Prototype is void(const GamepadConnectionEvent&).

Returns

SubscriptionId.