//GetJoystickName returns the name, encoded as UTF-8, of the specified joystick. func GetJoystickName(joy Joystick) (string, error) { jn := C.glfwGetJoystickName(C.int(joy)) if jn == nil { return "", errors.New("Joystick is not present.") } return C.GoString(jn), nil }
// GetJoystickName returns the name, encoded as UTF-8, of the specified joystick. func GetJoystickName(joy Joystick) string { jn := C.glfwGetJoystickName(C.int(joy)) panicError() return C.GoString(jn) }