public vJoyFeeder() { NbButtons = -1; // Create one joystick object and a position structure. Joystick = new vJoy(); Report = new vJoy.JoystickState(); FFBReceiver = new vJoyFFBReceiver(); // Prepare list of vJoy's axes configuration. This is done // only one time after retreiving vJoy's information // Fill all axes HIDAxesInfo.Clear(); foreach (HID_USAGES toBeTested in Enum.GetValues(typeof(HID_USAGES))) { // Skip POV if (toBeTested == HID_USAGES.HID_USAGE_POV) { continue; } var name = toBeTested.ToString().Replace("HID_USAGE_", ""); var axisinfo = new vJoyAxisInfos(); axisinfo.HID_Usage = toBeTested; axisinfo.Name = name; HIDAxesInfo.Add(axisinfo); } // Fill OnlyUsedInfo by copying reference from AllAxesInfo once done ConfiguredvJoyAxes.Clear(); }