internal/gamepad: reorder function implements

This commit is contained in:
Hajime Hoshi 2022-07-15 21:52:22 +09:00
parent d6547f12c6
commit 9e1a2bcb30

View File

@ -215,6 +215,11 @@ type _IGameInputDevice_Vtbl struct {
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 {
vtbl *_IGameInputReading_Vtbl
}
@ -257,8 +262,3 @@ func (i *_IGameInputReading) GetGamepadState() (_GameInputGamepadState, bool) {
func (i *_IGameInputReading) Release() {
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)
}