MCPcopy
hub / github.com/fogleman/nes / joystickReset

Function joystickReset

ui/util.go:105–114  ·  view source on GitHub ↗
(joy glfw.Joystick)

Source from the content-addressed store, hash-verified

103}
104
105func joystickReset(joy glfw.Joystick) bool {
106 if !glfw.JoystickPresent(joy) {
107 return false
108 }
109 buttons := glfw.GetJoystickButtons(joy)
110 if len(buttons) < 6 {
111 return false
112 }
113 return buttons[4] == 1 && buttons[5] == 1
114}
115
116func combineButtons(a, b [8]bool) [8]bool {
117 var result [8]bool

Callers 1

UpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected