Example #1
0
        public static bool InitJoy(IFfbListener listener)
        {
            joyStick    = new vJoy();
            ffbListener = listener;
            VjdStat status = joyStick.GetVJDStatus(joyId);

            if ((status == VjdStat.VJD_STAT_OWN) || ((status == VjdStat.VJD_STAT_FREE) && (!joyStick.AcquireVJD(joyId))))
            {
                Console.WriteLine("Failed to acquire vJoy device number {0}.\n", joyId);
                return(false);
            }
            else
            {
                Console.WriteLine("Acquired: vJoy device number {0}.\n", joyId);
                joyStick.ResetVJD(joyId);
                joyStick.FfbRegisterGenCB(OnFFBEvent, joyId);
                return(true);
            }
        }
Example #2
0
 public PCController(IFfbListener ffbListener)
 {
     this.ffbListener = ffbListener;
 }