示例#1
0
 public void MapControls(Usb.GameControllers.Microsoft.Sidewinder.GameVoice.Joystick swgv)
 {
     // Add in the mappings
     Disposables = new List <IDisposable> {
         //swgv.Where(x => Reactive.ButtonsChanged(x)).Subscribe(x => SwGameButtonStateHandler.Process(x, this), ex => log.Error($"Exception : {ex}")),
         //swgv.Where(x => Reactive.ButtonsChanged(x)).Subscribe(x => SwGameLandingGearHandler.Process(x, this), ex => log.Error($"Exception : {ex}")),
         swgv.Where(x => Reactive.ButtonsChanged(x)).Subscribe(x => SwGameVoicemeeterHandler.Process(x, this), ex => Logger.LogError($"Exception : {ex}")),
         //swgv.Where(x => Reactive.ButtonsChanged(x)).Subscribe(x => SwGameMuteHandler.Process(x, this), ex => log.Error($"Exception : {ex}"))
     };
 }
示例#2
0
        public void Initialize(string devicePath)
        {
            joystick = new Usb.GameControllers.Microsoft.Sidewinder.GameVoice.Joystick(devicePath, Logger);
            MapControls(joystick);
            //MapLights(joystick);

            // Initialize Voicemeeter and Login
            Disposables.Add(VoiceMeeter.Remote.Initialize(Voicemeeter.RunVoicemeeterParam.VoicemeeterBanana).Result);

            joystick.Initialize();

            //WatchChanges();

            SwGameVoicemeeterHandler.UpdateLights(joystick);
        }