Пример #1
0
            public Device(PPJoyPlugin plugin, VirtualJoystick joystick)
            {
                LowerRange = -1000;
                UpperRange = 1000;

                this.plugin        = plugin;
                Joystick           = joystick;
                setPressedStrategy = new SetPressedStrategy(OnPress, OnRelease);
            }
Пример #2
0
        protected PPJoyPluginTest()
        {
            var plugin = new PPJoyPlugin();
            var global = (plugin.CreateGlobal() as PPJoyGlobal[])[0];

            plugin.Start();

            using (var joystick = GetJoystick())
            {
                if (joystick == null)
                    Assert.Fail("No PPJoy virtual stick found");

                DoTest(global);
                plugin.DoBeforeNextExecute();

                while((joystick.Acquire().IsFailure || joystick.Poll().IsFailure)) { }

                state = joystick.GetCurrentState();
            }

            plugin.Stop();
        }
Пример #3
0
 public PPJoyGlobal(int index, PPJoyPlugin plugin)
 {
     this.index = index;
     this.plugin = plugin;
 }
Пример #4
0
            public Device(PPJoyPlugin plugin,  VirtualJoystick joystick)
            {
                LowerRange = -1000;
                UpperRange = 1000;

                this.plugin = plugin;
                Joystick = joystick;
                setPressedStrategy = new SetPressedStrategy(OnPress, OnRelease);
            }
Пример #5
0
 public PPJoyGlobal(int index, PPJoyPlugin plugin)
 {
     this.index  = index;
     this.plugin = plugin;
 }