joyUp method

bool joyUp(
  1. int port,
  2. GamepadButton btn
)

Checks if a specific button on a given gamepad port was just released in the current frame.

Returns true if the button was released in this frame (i.e., it was down last frame and is up now), false otherwise or if the port is invalid.

Implementation

bool joyUp(int port, GamepadButton btn) {
  if (port < 0 || port >= _input.length) return false;
  return _input[port].buttonUp[btn.index];
}