vJoyInterfaceWrap.vJoy.GetVJDAxisExist C# (CSharp) Method

GetVJDAxisExist() public method

public GetVJDAxisExist ( UInt32 rID, HID_USAGES Axis ) : bool
rID UInt32
Axis HID_USAGES
return bool
        public bool GetVJDAxisExist(UInt32 rID, HID_USAGES Axis)
        {
            UInt32 res = _GetVJDAxisExist(rID, (uint)Axis);
            if (res == 1)
                return true;
            else
                return false;
        }
        public bool GetVJDAxisMax(UInt32 rID, HID_USAGES Axis, ref long Max) { return _GetVJDAxisMax(rID, (uint)Axis, ref Max); }

Usage Example

コード例 #1
0
ファイル: JoystickOutput.cs プロジェクト: nlhans/SimShift
        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;
        }
All Usage Examples Of vJoyInterfaceWrap.vJoy::GetVJDAxisExist