summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-09-27 23:04:29 -0400
committera1xd <[email protected]>2020-09-27 23:04:29 -0400
commit85aefb4ba131521595e48fe1a25f4db9a69e71e6 (patch)
treef1c73a42b369f362a40ea251281d98ee02bf0a98 /driver
parentadd os detection to installer (diff)
downloadrawaccel-85aefb4ba131521595e48fe1a25f4db9a69e71e6.tar.xz
rawaccel-85aefb4ba131521595e48fe1a25f4db9a69e71e6.zip
add arg checks in wrapper
minor changes to settings shape, requires driver reinstall add error handling to writer grapher changes: add prettier serialization + comments add elements for scale and separated limit/exp reset irrelevant (invisible) arg input before checks/write
Diffstat (limited to 'driver')
-rw-r--r--driver/driver.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/driver/driver.cpp b/driver/driver.cpp
index 4dd3d62..5fa1dd1 100644
--- a/driver/driver.cpp
+++ b/driver/driver.cpp
@@ -151,9 +151,8 @@ Return Value:
DebugPrint(("Ioctl received into filter control object.\n"));
if (InputBufferLength == sizeof(ra::settings)) {
- // 1 second wait
LARGE_INTEGER interval;
- interval.QuadPart = -10000000;
+ interval.QuadPart = static_cast<LONGLONG>(ra::WRITE_DELAY) * -10000;
KeDelayExecutionThread(KernelMode, FALSE, &interval);
status = WdfRequestRetrieveInputBuffer(
@@ -172,7 +171,7 @@ Return Value:
ra::settings new_settings = *reinterpret_cast<ra::settings*>(buffer);
- if (new_settings.time_min <= 0 || _isnanf(new_settings.time_min)) {
+ if (new_settings.time_min <= 0 || _isnanf(static_cast<float>(new_settings.time_min))) {
new_settings.time_min = ra::settings{}.time_min;
}