Gamepad constructor

Gamepad(
  1. int controller
)

Creates an instance of Gamepad for the specified controller.

The controller parameter represents the index of the gamepad controller.

Up to four controllers may be connected to a system, numbered from 0 to 3.

Implementation

Gamepad(this.controller)
    : assert(controller >= 0 && controller < XUSER_MAX_COUNT) {
  _initializeCom();
  updateState();
}