private vJoy initVjoy(uint id)
{
var joystick = new vJoy();
var iReport = new vJoy.JoystickState();
// Get the state of the requested device
VjdStat status = joystick.GetVJDStatus(id);
/*switch (status)
{
case VjdStat.VJD_STAT_OWN:
MessageBox.Show(string.Format("vJoy Device {0} is already owned by this feeder\n", id));
break;
case VjdStat.VJD_STAT_FREE:
MessageBox.Show(string.Format("vJoy Device {0} is free\n", id));
break;
case VjdStat.VJD_STAT_BUSY:
MessageBox.Show(string.Format("vJoy Device {0} is already owned by another feeder\nCannot continue\n", id));
return joystick;
case VjdStat.VJD_STAT_MISS:
MessageBox.Show(string.Format("vJoy Device {0} is not installed or disabled\nCannot continue\n", id));
return joystick;
default:
MessageBox.Show(string.Format("vJoy Device {0} general error\nCannot continue\n", id));
return joystick;
}*/
bool AxisX = joystick.GetVJDAxisExist(id, HID_USAGES.HID_USAGE_X);
if (joystick.AcquireVJD(id) == false)
MessageBox.Show("Could not acquire vJoy " + id);
Console.WriteLine(AxisX);
return joystick;
}