internal/gamepad: rename ButtonNum -> ButtonCount

This commit is contained in:
Hajime Hoshi 2022-09-07 15:40:52 +09:00
parent b5d755b07a
commit db1255cdf8
2 changed files with 2 additions and 2 deletions

View File

@ -51,4 +51,4 @@ const (
Button31
)
const ButtonNum = 32
const ButtonCount = 32

View File

@ -102,7 +102,7 @@ func (g *gamepads) update() error {
// recognized as gamepads by OSes. In this case, the number of the 'buttons' can exceeds the
// maximum. Skip such devices as a tentative solution (#1173, #2039).
g.remove(func(gamepad *Gamepad) bool {
return gamepad.ButtonCount() > ButtonNum
return gamepad.ButtonCount() > ButtonCount
})
for _, gp := range g.gamepads {