MCPcopy Index your code
hub / github.com/fogleman/nes / updateControllers

Function updateControllers

ui/gameview.go:149–156  ·  view source on GitHub ↗
(window *glfw.Window, console *nes.Console)

Source from the content-addressed store, hash-verified

147}
148
149func updateControllers(window *glfw.Window, console *nes.Console) {
150 turbo := console.PPU.Frame%6 < 3
151 k1 := readKeys(window, turbo)
152 j1 := readJoystick(glfw.Joystick1, turbo)
153 j2 := readJoystick(glfw.Joystick2, turbo)
154 console.SetButtons1(combineButtons(k1, j1))
155 console.SetButtons2(j2)
156}

Callers 1

UpdateMethod · 0.85

Calls 5

readKeysFunction · 0.85
readJoystickFunction · 0.85
combineButtonsFunction · 0.85
SetButtons1Method · 0.80
SetButtons2Method · 0.80

Tested by

no test coverage detected