From 16dc4df3d438142ae378c9c6983585d06e0c6a33 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Mon, 29 Mar 2021 17:14:49 -0400 Subject: refactor common/settings only driver compiles remove accel-base types merge linear + classic move gain cap logic into classic impl, cap is now set in terms of output use cap/limit to determine negation remove weight, add replacement for power mode only remove legacy offset option remove naturalgain mode add legacy mode flag naturalgain -> natural natural -> natural + legacy flag add dpi setting and more accel args + defaults (prep for ips mode) replace output speed cap with input cap --- driver/driver.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'driver/driver.cpp') diff --git a/driver/driver.cpp b/driver/driver.cpp index 0c21f34..235571c 100644 --- a/driver/driver.cpp +++ b/driver/driver.cpp @@ -1,8 +1,9 @@ +#include "driver.h" + #include #include #include -#include "driver.h" #ifdef ALLOC_PRAGMA #pragma alloc_text (INIT, DriverEntry) @@ -11,8 +12,6 @@ #pragma alloc_text (PAGE, RawaccelControl) #endif -namespace ra = rawaccel; - using milliseconds = double; using lut_value_t = ra::si_pair; @@ -21,7 +20,7 @@ struct { milliseconds tick_interval = 0; // set in DriverEntry ra::mouse_modifier modifier; vec2 lookups = {}; -} global; +} global = {}; VOID RawaccelCallback( @@ -59,7 +58,7 @@ Arguments: bool any = num_packets > 0; bool rel_move = !(InputDataStart->Flags & MOUSE_MOVE_ABSOLUTE); bool dev_match = global.args.device_id[0] == 0 || - wcsncmp(devExt->dev_id, global.args.device_id, MAX_DEV_ID_LEN) == 0; + wcsncmp(devExt->dev_id, global.args.device_id, ra::MAX_DEV_ID_LEN) == 0; if (any && rel_move && dev_match) { // if IO is backed up to the point where we get more than 1 packet here @@ -507,7 +506,7 @@ Return Value: if (NT_SUCCESS(nts)) { auto* id_ptr = reinterpret_cast(iosb.Information); - wcsncpy(FilterGetData(hDevice)->dev_id, id_ptr, MAX_DEV_ID_LEN); + wcsncpy(FilterGetData(hDevice)->dev_id, id_ptr, ra::MAX_DEV_ID_LEN); DebugPrint(("Device ID = %ws\n", id_ptr)); ExFreePool(id_ptr); } -- cgit v1.2.3