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