diff options
| author | a1xd <[email protected]> | 2021-03-29 17:14:49 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-03-29 17:14:49 -0400 |
| commit | 16dc4df3d438142ae378c9c6983585d06e0c6a33 (patch) | |
| tree | 1080b11b6ec98d6f47509ced922f2c338e0068bd /driver/driver.cpp | |
| parent | Merge pull request #81 from a1xd/log-unhandled-ex (diff) | |
| download | rawaccel-16dc4df3d438142ae378c9c6983585d06e0c6a33.tar.xz rawaccel-16dc4df3d438142ae378c9c6983585d06e0c6a33.zip | |
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
Diffstat (limited to 'driver/driver.cpp')
| -rw-r--r-- | driver/driver.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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 <rawaccel.hpp> #include <rawaccel-io-def.h> #include <rawaccel-version.h> -#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<lut_value_t*> 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<WCHAR*>(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); } |