mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
parent
8334ca9a18
commit
edff1f0dd9
@ -499,12 +499,6 @@ func Update(mapping []byte) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// TODO: Implement this (#1722)
|
||||
if currentPlatform == platformIOS {
|
||||
// Note: NOT returning an error, as mappings also do not matter right now.
|
||||
return false, nil
|
||||
}
|
||||
|
||||
mappingsM.Lock()
|
||||
defer mappingsM.Unlock()
|
||||
|
||||
|
@ -452,6 +452,7 @@ func (i *Input) updateGamepads() {
|
||||
Name: string(name),
|
||||
ButtonNum: int(property.nButtons),
|
||||
AxisNum: int(property.nAxes),
|
||||
HatNum: int(property.nHats),
|
||||
}
|
||||
|
||||
var state C.struct_ControllerState
|
||||
@ -476,6 +477,10 @@ func (i *Input) updateGamepads() {
|
||||
gamepad.Axes[j] = float32(state.axes[j])
|
||||
}
|
||||
|
||||
if gamepad.HatNum > 0 {
|
||||
gamepad.Hats[0] = int(state.hat)
|
||||
}
|
||||
|
||||
i.gamepads = append(i.gamepads, gamepad)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user