Exemplo n.º 1
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();
        }