diff options
| author | a1xd <[email protected]> | 2021-09-05 21:12:39 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-09-23 22:28:44 -0400 |
| commit | bb575220aba8f81e31e5dc0b2e376ac54955a49d (patch) | |
| tree | d7e15809f18d6003d9283c4337bc5af40f6a307f /driver/driver.cpp | |
| parent | make ioctls constexpr (diff) | |
| download | rawaccel-bb575220aba8f81e31e5dc0b2e376ac54955a49d.tar.xz rawaccel-bb575220aba8f81e31e5dc0b2e376ac54955a49d.zip | |
fix kernel bugcheck
initializing the default driver_settings on driver entry blows up the stack size, causing stack check to fail
the default modifier is initialized to noop anyway so it's fine to leave most vars zeroed
Diffstat (limited to 'driver/driver.cpp')
| -rw-r--r-- | driver/driver.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/driver.cpp b/driver/driver.cpp index 4cc0072..3096de8 100644 --- a/driver/driver.cpp +++ b/driver/driver.cpp @@ -324,8 +324,10 @@ RawaccelInit(WDFDRIVER driver) if (nonpaged_p) { RtlZeroMemory(nonpaged_p, ra::POOL_SIZE); global.driver_data = static_cast<ra::driver_settings*>(nonpaged_p); - *global.driver_data = {}; - *global.modifier_data = { *global.driver_data }; + global.driver_data->prof.domain_weights = { 1, 1 }; + global.driver_data->prof.range_weights = { 1, 1 }; + global.driver_data->prof.sensitivity = 1; + global.driver_data->prof.yx_sens_ratio = 1; global.driver_data_size = 1; } else { |