diff options
| author | a1xd <[email protected]> | 2021-09-06 23:24:51 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-09-23 22:33:13 -0400 |
| commit | a8d48325d5e6fe0466502b865c82317b6f7410a2 (patch) | |
| tree | a1d42734cda76cdf2a0b0c8134ef25f4729e99b3 /grapher/Models/Mouse | |
| parent | increase lut points capacity to 257 (diff) | |
| download | rawaccel-a8d48325d5e6fe0466502b865c82317b6f7410a2.tar.xz rawaccel-a8d48325d5e6fe0466502b865c82317b6f7410a2.zip | |
get grapher building
Diffstat (limited to 'grapher/Models/Mouse')
| -rw-r--r-- | grapher/Models/Mouse/MouseWatcher.cs | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/grapher/Models/Mouse/MouseWatcher.cs b/grapher/Models/Mouse/MouseWatcher.cs index c5c2ae5..c36ceb4 100644 --- a/grapher/Models/Mouse/MouseWatcher.cs +++ b/grapher/Models/Mouse/MouseWatcher.cs @@ -691,7 +691,6 @@ namespace grapher.Models.Mouse AccelCharts = accelCharts; SettingsManager = setMngr; MouseData = new MouseData(); - DeviceHandles = new List<IntPtr>(); RAWINPUTDEVICE device = new RAWINPUTDEVICE(); device.WindowHandle = ContainingForm.Handle; @@ -722,10 +721,6 @@ namespace grapher.Models.Mouse private Stopwatch Stopwatch { get; } - private List<IntPtr> DeviceHandles { get; } - - private bool AnyDevice { get; set; } - private double PollTime { get => 1000 / SettingsManager.PollRateField.Data; @@ -735,16 +730,6 @@ namespace grapher.Models.Mouse #region Methods - public void UpdateHandles(string devID) - { - DeviceHandles.Clear(); - AnyDevice = string.IsNullOrEmpty(devID); - if (!AnyDevice) - { - RawInputInterop.AddHandlesFromID(devID, DeviceHandles); - } - } - public void UpdateLastMove() { MouseData.Get(out var x, out var y); @@ -758,7 +743,7 @@ namespace grapher.Models.Mouse _ = GetRawInputData(message.LParam, RawInputCommand.Input, out rawInput, ref size, Marshal.SizeOf(typeof(RAWINPUTHEADER))); bool relative = !rawInput.Data.Mouse.Flags.HasFlag(RawMouseFlags.MoveAbsolute); - bool deviceMatch = AnyDevice || DeviceHandles.Contains(rawInput.Header.Device); + bool deviceMatch = SettingsManager.ActiveHandles.Contains(rawInput.Header.Device); if (relative && deviceMatch && (rawInput.Data.Mouse.LastX != 0 || rawInput.Data.Mouse.LastY != 0)) { @@ -772,8 +757,7 @@ namespace grapher.Models.Mouse // strip negative directional multipliers, charts calculated from positive input - Vec2<double> dirMults = SettingsManager.ActiveSettings.baseSettings - .directionalMultipliers; + Vec2<double> dirMults = SettingsManager.ActiveProfile.directionalMultipliers; if (dirMults.x > 0 && x < 0) { |