private void Listen() { Log.Information("VigemInternals.Listen"); SleepTimer.Start(); RequestsPerSecondTimer.Start(); GamepadProcessor gp = new GamepadProcessor(); Task.Factory.StartNew(() => { controller.ResetReport(); while (true) { try { PS4RemotePlayInterceptor.DualShockState x = gp.GetState(); if (x != null) { //Log.Information("ds" + gp.DualShockStateToString(ref x)); GamepadConverter.ConvertandSendReport(controller, x); } } catch (Exception ex) { ExceptionLogger.LogException("VigemInternals.Listen L57", ex); } Sleep(); } }); }
private void StartRemotePlayAndConditionallyInject() { if (EmulationConstants.ONLY_VIGEM.Equals(ApplicationSettings.GetInstance().EmulationMode)) { RemotePlayStarter rps = new RemotePlayStarter(); rps.OpenRemotePlay(); } else { GamepadProcessor gp = ((MainViewModel)DataContext).GamepadProcessor; RemotePlayInjector RemotePlayInjector = new RemotePlayInjector(); RemotePlayInjector.OpenRemotePlayAndInject(gp); } }
public MainViewModel() { GamepadProcessor = new GamepadProcessor(); }