예제 #1
0
        public void InitilizePrimaryController(HidControllerType controllerType)
        {
            HidControllerId controllerId = controllerType == HidControllerType.Handheld ?
                                           HidControllerId.ControllerHandheld : HidControllerId.ControllerPlayer1;

            if (controllerType == HidControllerType.ProController)
            {
                PrimaryController = new HidProController(_device);
            }
            else
            {
                PrimaryController = new HidNpadController(controllerType,
                                                          _device,
                                                          (NpadColor.BodyNeonRed, NpadColor.BodyNeonRed),
                                                          (NpadColor.ButtonsNeonBlue, NpadColor.ButtonsNeonBlue));
            }

            PrimaryController.Connect(controllerId);
        }
예제 #2
0
파일: Hid.cs 프로젝트: zhubaojian/Ryujinx
        public void InitilizePrimaryController(HidControllerType ControllerType)
        {
            HidControllerId ControllerId = ControllerType == HidControllerType.Handheld ?
                                           HidControllerId.CONTROLLER_HANDHELD : HidControllerId.CONTROLLER_PLAYER_1;

            if (ControllerType == HidControllerType.ProController)
            {
                PrimaryController = new HidProController(Device);
            }
            else
            {
                PrimaryController = new HidNpadController(ControllerType,
                                                          Device,
                                                          (NpadColor.Body_Neon_Red, NpadColor.Body_Neon_Red),
                                                          (NpadColor.Buttons_Neon_Blue, NpadColor.Buttons_Neon_Blue));
            }

            PrimaryController.Connect(ControllerId);
        }