diff options
| author | JacobPalecki <[email protected]> | 2020-09-22 19:59:47 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-22 19:59:47 -0700 |
| commit | 77f420cf45a1a0bee00602965e687097367e2a70 (patch) | |
| tree | fa088af8f2feb54df5bcb6a036715fd32d0511e8 /wrapper/wrapper.cpp | |
| parent | Merge pull request #21 from JacobPalecki/GUI (diff) | |
| parent | Update credits (diff) | |
| download | rawaccel-77f420cf45a1a0bee00602965e687097367e2a70.tar.xz rawaccel-77f420cf45a1a0bee00602965e687097367e2a70.zip | |
Merge pull request #22 from JacobPalecki/GUI
Replace SigmoidGain with Motivity & Cleanup
Diffstat (limited to 'wrapper/wrapper.cpp')
| -rw-r--r-- | wrapper/wrapper.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/wrapper/wrapper.cpp b/wrapper/wrapper.cpp index 3108bda..0778bc3 100644 --- a/wrapper/wrapper.cpp +++ b/wrapper/wrapper.cpp @@ -22,6 +22,13 @@ public ref struct DriverInterop public ref class ManagedAccel { mouse_modifier* const modifier_instance = new mouse_modifier(); +#ifdef RA_LOOKUP + si_pair* const lut_x = new si_pair[LUT_SIZE]; + si_pair* const lut_y = new si_pair[LUT_SIZE]; +#else + si_pair* lut_x = nullptr; + si_pair* lut_y = nullptr; +#endif public: static initonly double WriteDelay = -10000000 / -10000.0; @@ -29,11 +36,15 @@ public: virtual ~ManagedAccel() { delete modifier_instance; + delete[] lut_x; + delete[] lut_y; } !ManagedAccel() { delete modifier_instance; + delete[] lut_x; + delete[] lut_y; } Tuple<double, double>^ Accelerate(int x, int y, double time) @@ -49,7 +60,10 @@ public: void UpdateFromSettings(IntPtr argsIn) { - *modifier_instance = { *reinterpret_cast<settings*>(argsIn.ToPointer()) }; + *modifier_instance = { + *reinterpret_cast<settings*>(argsIn.ToPointer()) + , vec2<si_pair*>{ lut_x, lut_y } + }; } static ManagedAccel^ GetActiveAccel() @@ -58,7 +72,10 @@ public: wrapper_io::readFromDriver(args); auto active = gcnew ManagedAccel(); - *active->modifier_instance = { args }; + *active->modifier_instance = { + args + , vec2<si_pair*> { active->lut_x, active->lut_y } + }; return active; } }; |