code: func (w *Window) updateJoystickInput() {
  	for js := Joystick1; js <= JoystickLast; js++ {
  		// Determine and store if the joystick was connected
  		joystickPresent := glfw.JoystickPresent(glfw.Joystick(js))
  		w.tempJoy.connected[js] = joystickPresent
  
  		if joystickPresent {
  			w.tempJoy.buttons[js] = glfw.GetJoystickButtons(glfw.Joystick(js))
  			w.tempJoy.axis[js] = glfw.GetJoystickAxes(glfw.Joystick(js))
  
  			if !w.currJoy.connected[js] {
  				// The joystick was recently connected, we get the name
  				w.tempJoy.name[js] = glfw.GetJoystickName(glfw.Joystick(js))
  			} else {
  				// Use the name from the previous one
  				w.tempJoy.name[js] = w.currJoy.name[js]
  			}
  		} else {
  			w.tempJoy.buttons[js] = []byte{}
  			w.tempJoy.axis[js] = []float32{}
  			w.tempJoy.name[js] = ""
  		}
  	}
  
  	w.prevJoy = w.currJoy
  	w.currJoy = w.tempJoy
  }
docs: // Used internally during Window.UpdateInput to update the state of the joysticks.