diff options
| author | Jacob Palecki <[email protected]> | 2020-09-27 21:13:03 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-27 21:13:03 -0700 |
| commit | 5d8700a462b4798c02f4a73bc66d2a69a4920ae1 (patch) | |
| tree | 3a2b71991a6efce65be9af0c303ec2b59bdebff4 /driver/driver.cpp | |
| parent | Set tab order (diff) | |
| parent | Merge pull request #26 from a1xd/argcheck (diff) | |
| download | rawaccel-5d8700a462b4798c02f4a73bc66d2a69a4920ae1.tar.xz rawaccel-5d8700a462b4798c02f4a73bc66d2a69a4920ae1.zip | |
Merge and fix write button
Diffstat (limited to 'driver/driver.cpp')
| -rw-r--r-- | driver/driver.cpp | 5 |
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; } |