//initializer
public JoyControl()
{
joystick = new vJoy();
iReport = new vJoy.JoystickState();
if (!joystick.vJoyEnabled())
{
sta="vJoy driver not enabled: Failed Getting vJoy attributes.";
return;
}
else
sta= "Vendor: " + joystick.GetvJoyManufacturerString() + "\nProduct :" + joystick.GetvJoyProductString() + "\nVersion Number:" + joystick.GetvJoySerialNumberString();
iReport.AxisXRot = 16500;
iReport.AxisYRot = 16500;
iReport.AxisZRot = 16500;
iReport.AxisX = 16500;
iReport.AxisY = 16500;
iReport.AxisZ = 16500;
if (!joystick.UpdateVJD(id, ref iReport))
{
joystick.AcquireVJD(id);
}
}