mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
internal/gamepad: reorder function implements
This commit is contained in:
parent
d6547f12c6
commit
9e1a2bcb30
@ -215,6 +215,11 @@ type _IGameInputDevice_Vtbl struct {
|
|||||||
ReleaseExclusiveRawDeviceAccess uintptr
|
ReleaseExclusiveRawDeviceAccess uintptr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (i *_IGameInputDevice) SetRumbleState(params *_GameInputRumbleParams, timestamp uint64) {
|
||||||
|
syscall.Syscall(i.vtbl.SetRumbleState, 3, uintptr(unsafe.Pointer(i)), uintptr(unsafe.Pointer(params)), uintptr(timestamp))
|
||||||
|
runtime.KeepAlive(params)
|
||||||
|
}
|
||||||
|
|
||||||
type _IGameInputReading struct {
|
type _IGameInputReading struct {
|
||||||
vtbl *_IGameInputReading_Vtbl
|
vtbl *_IGameInputReading_Vtbl
|
||||||
}
|
}
|
||||||
@ -257,8 +262,3 @@ func (i *_IGameInputReading) GetGamepadState() (_GameInputGamepadState, bool) {
|
|||||||
func (i *_IGameInputReading) Release() {
|
func (i *_IGameInputReading) Release() {
|
||||||
syscall.Syscall(i.vtbl.Release, 1, uintptr(unsafe.Pointer(i)), 0, 0)
|
syscall.Syscall(i.vtbl.Release, 1, uintptr(unsafe.Pointer(i)), 0, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *_IGameInputDevice) SetRumbleState(params *_GameInputRumbleParams, timestamp uint64) {
|
|
||||||
syscall.Syscall(i.vtbl.SetRumbleState, 3, uintptr(unsafe.Pointer(i)), uintptr(unsafe.Pointer(params)), uintptr(timestamp))
|
|
||||||
runtime.KeepAlive(params)
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user