From 0e60e22b73dd0693b349cbb63cf9a390c01fd5dd Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:01:18 -0500 Subject: filter raw input based on id use device id (from device instance) over first hardware id use buffered method for all ioctls update gui/DeviceIDManager to match driver behavior respond to device change events desync MouseData and PointData accessors --- grapher/Models/AccelGUI.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'grapher/Models/AccelGUI.cs') diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 9f97eed..81b3e13 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -100,6 +100,8 @@ namespace grapher public DeviceIDManager DeviceIDManager { get; } + public Action UpdateInputManagers { get; private set; } + private Timer ChartRefresh { get; } private Font SmallButtonFont { get; } @@ -147,7 +149,7 @@ namespace grapher args = newArgs, minimumTime = driverSettings.minimumTime, directionalMultipliers = driverSettings.directionalMultipliers, - deviceHardwareID = DeviceIDManager.HWID, + deviceID = DeviceIDManager.ID, }; ButtonDelay(WriteButton); @@ -168,6 +170,14 @@ namespace grapher { UpdateShownActiveValues(args); UpdateGraph(args); + + UpdateInputManagers = () => + { + MouseWatcher.UpdateHandles(args.deviceID); + DeviceIDManager.Update(args.deviceID); + }; + + UpdateInputManagers(); } public void UpdateGraph(DriverSettings args) -- cgit v1.2.3