private void RefreshInput() { // Feed the device id m_State.bDevice = (byte)m_Id; // Feed position data per axis m_State.AxisX = 0; m_State.AxisY = 0; m_State.AxisZ = 0; m_State.AxisZRot = 0; m_State.AxisXRot = 0; // Set buttons one by one m_State.Buttons = 0; if (m_ButtonState) { m_State.Buttons = (uint)(0x1 << (int)m_ButtonId); } // Feed the driver with the position packet m_Interface.UpdateVJD(m_Id, ref m_State); m_ButtonState = !m_ButtonState; }
public void Update() { Vjoy.UpdateVJD(1, ref JoystickState); }