Пример #1
0
 void onButtonPressed(SlimDX.XInput.Controller controller, SlimDX.XInput.UserIndex index, SlimDX.XInput.GamepadButtonFlags button)
 {
     SlimDX.XInput.GamepadButtonFlags buttons = controller.GetState().Gamepad.Buttons;
     if ( mEmulators.isEmulatorRunning() &&
         (buttons & SlimDX.XInput.GamepadButtonFlags.Back) != 0 &&
         (buttons & SlimDX.XInput.GamepadButtonFlags.Start) != 0 &&
         (buttons & SlimDX.XInput.GamepadButtonFlags.LeftShoulder) != 0 &&
         (buttons & SlimDX.XInput.GamepadButtonFlags.RightShoulder) != 0)
     {
         mEmulators.stopEmulators();
     }
 }