summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authora1xd <[email protected]>2021-04-01 23:28:41 -0400
committera1xd <[email protected]>2021-04-01 23:28:41 -0400
commitd8140fb31ba622f48756986d4d66db6b6ab8b511 (patch)
tree8faa873d4468882c63f1f8fa02b94f4b6b3a65f6 /driver
parentcheck for safe mode before hooking into dev stack (diff)
downloadrawaccel-d8140fb31ba622f48756986d4d66db6b6ab8b511.tar.xz
rawaccel-d8140fb31ba622f48756986d4d66db6b6ab8b511.zip
use callbacks for applying accel
Diffstat (limited to 'driver')
-rw-r--r--driver/driver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/driver.cpp b/driver/driver.cpp
index 0c272e1..fa2415d 100644
--- a/driver/driver.cpp
+++ b/driver/driver.cpp
@@ -16,7 +16,8 @@ using milliseconds = double;
struct {
ra::settings args;
- milliseconds tick_interval = 0; // set in DriverEntry
+ milliseconds tick_interval;
+ vec2<ra::accel_invoker> invokers;
ra::mouse_modifier modifier;
} global = {};
@@ -83,7 +84,7 @@ Arguments:
static_cast<double>(it->LastY)
};
- global.modifier.modify(input, time);
+ global.modifier.modify(input, global.invokers, time);
double carried_result_x = input.x + devExt->carry.x;
double carried_result_y = input.y + devExt->carry.y;
@@ -193,6 +194,7 @@ Return Value:
ra::io_t& input = *reinterpret_cast<ra::io_t*>(buffer);
global.args = input.args;
+ global.invokers = ra::invokers(input.args);
global.modifier = input.mod;
}
break;