diff options
| author | JacobPalecki <[email protected]> | 2020-09-27 20:54:57 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-27 20:54:57 -0700 |
| commit | 5f3ea6699f4b1a7eec7f9f0cd51ad9afbc1dea4b (patch) | |
| tree | f1c73a42b369f362a40ea251281d98ee02bf0a98 /driver/driver.cpp | |
| parent | Merge pull request #25 from JacobPalecki/GUI (diff) | |
| parent | add arg checks in wrapper (diff) | |
| download | rawaccel-5f3ea6699f4b1a7eec7f9f0cd51ad9afbc1dea4b.tar.xz rawaccel-5f3ea6699f4b1a7eec7f9f0cd51ad9afbc1dea4b.zip | |
Merge pull request #26 from a1xd/argcheck
Accel arg checks
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; } |