protected virtual void Dispose(bool disposing) { if (disposing) { _lowPassFilterTimer.Start(); _lowPassFilterTimer.Dispose(); XboxController.StopPolling(); } }
public void Shutdown() { Log.WriteLine("Shutting down XInput controllers..."); XboxController.StopPolling(); _active = false; foreach (var c in Controllers) { c.Stop(); } }
public static void Stop() { if (_watcherThread == null) { return; } Logger.Write("Stopping controller manager"); _watcherThread.Abort(); _watcherThread = null; foreach (var controller in _allControllers) { controller?.Stop(); } _allControllers.Clear(); XboxController.StopPolling(); DS4Devices.stopControllers(); }
internal void InitializeController() { XboxController.StopPolling(); try { _controller = XboxController.RetrieveController(_currid); _controller.StateChanged += _selectedController_StateChanged; XboxController.StartPolling(); _message = "Connected to controller #" + _currid; } catch { AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "Cannot find controller with ID #" + _currid); _controller = null; _message = "Cannot find controller with ID #" + _currid; } }
protected override void OnClosing(CancelEventArgs e) { XboxController.StopPolling(); base.OnClosing(e); }
private void StopPolling() { _controller.StateChanged -= StateChanged; XboxController.StopPolling(); }
public void Stop() { XboxController.StopPolling(); }