mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
c14403f195
commit
520a30f3c7
@ -246,3 +246,7 @@ func (i *_IGameInputReading) GetGamepadState() (_GameInputGamepadState, bool) {
|
|||||||
r, _, _ := syscall.Syscall(i.vtbl.GetGamepadState, 2, uintptr(unsafe.Pointer(i)), uintptr(unsafe.Pointer(&state)), 0)
|
r, _, _ := syscall.Syscall(i.vtbl.GetGamepadState, 2, uintptr(unsafe.Pointer(i)), uintptr(unsafe.Pointer(&state)), 0)
|
||||||
return state, int32(r) != 0
|
return state, int32(r) != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (i *_IGameInputReading) Release() {
|
||||||
|
syscall.Syscall(i.vtbl.Release, 1, uintptr(unsafe.Pointer(i)), 0, 0)
|
||||||
|
}
|
||||||
|
@ -131,6 +131,7 @@ func (n *nativeGamepadXbox) update(gamepads *gamepads) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer r.Release()
|
||||||
|
|
||||||
state, ok := r.GetGamepadState()
|
state, ok := r.GetGamepadState()
|
||||||
if !ok {
|
if !ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user