mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
5bb22d2bcf
commit
e4d0050452
@ -328,7 +328,7 @@ func (g *nativeGamepad) update(gamepad *gamepads) error {
|
||||
|
||||
switch e.typ {
|
||||
case unix.EV_KEY:
|
||||
if e.code-_BTN_MISC < len(g.keyMap) {
|
||||
if int(e.code)-_BTN_MISC < len(g.keyMap) {
|
||||
idx := g.keyMap[e.code-_BTN_MISC]
|
||||
g.buttons[idx] = e.value != 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user