glfwJoystickIsGamepad function

int glfwJoystickIsGamepad(
  1. int jid
)

! @brief Returns whether the specified joystick has a gamepad mapping.

This function returns whether the specified joystick is both present and has a gamepad mapping.

If the specified joystick is present but does not have a gamepad mapping this function will return GLFW_FALSE but will not generate an error. Call @ref glfwJoystickPresent to check if a joystick is present regardless of whether it has a mapping.

@paramin jid The joystick(@ref joysticks) to query. @return GLFW_TRUE if a joystick is both present and has a gamepad mapping, or GLFW_FALSE otherwise.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_ENUM.

@thread_safety This function must only be called from the main thread.

@sa @ref gamepad @sa @ref glfwGetGamepadState

@since Added in version 3.3.

@ingroup input

GLFWAPI int glfwJoystickIsGamepad(int jid)

Implementation

int glfwJoystickIsGamepad(int jid) {
  final glfwJoystickIsGamepadLookupFunction =
      libglfw.lookupFunction<Int32 Function(Int32 jid), int Function(int jid)>(
          'glfwJoystickIsGamepad');
  return glfwJoystickIsGamepadLookupFunction(jid);
}