Ejemplo n.º 1
0
func (obj Device) GetMouseState(state *MouseState) (err error) {
	err = toError(C.IDirectInputDevice8GetDeviceState(
		obj.handle,
		C.sizeof_DIMOUSESTATE,
		unsafe.Pointer(&state.state),
	))
	return
}
Ejemplo n.º 2
0
func (obj Device) GetJoyState2(state *JoyState2) (err error) {
	err = toError(C.IDirectInputDevice8GetDeviceState(
		obj.handle,
		C.sizeof_DIJOYSTATE2,
		unsafe.Pointer(&state.state),
	))
	return
}
Ejemplo n.º 3
0
func (obj Device) GetKeyboardState(state *KeyboardState) (err error) {
	err = toError(C.IDirectInputDevice8GetDeviceState(
		obj.handle,
		256,
		unsafe.Pointer(&state[0]),
	))
	return
}