summaryrefslogtreecommitdiff
path: root/common/rawaccel.hpp
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-07-29 01:10:29 -0700
committerJacob Palecki <[email protected]>2020-07-29 01:10:29 -0700
commit7963edee802d5a7b51f1867a5133857c403c8ef6 (patch)
tree42995f07946acffefbf8adc22676e52f11b8faea /common/rawaccel.hpp
parentSeparate accel implementations into files (diff)
downloadrawaccel-7963edee802d5a7b51f1867a5133857c403c8ef6.tar.xz
rawaccel-7963edee802d5a7b51f1867a5133857c403c8ef6.zip
Inline methods for linking, and fix sens application bug
Diffstat (limited to 'common/rawaccel.hpp')
-rw-r--r--common/rawaccel.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp
index d0c1b66..6f737da 100644
--- a/common/rawaccel.hpp
+++ b/common/rawaccel.hpp
@@ -204,7 +204,7 @@ namespace rawaccel {
{
if (apply_rotate)
{
- return rotate(input);
+ input = rotate(input);
}
input.x *= sensitivity.x;
@@ -223,10 +223,14 @@ namespace rawaccel {
{
if (apply_rotate)
{
- return rotate(input);
+ input = rotate(input);
+ }
+
+ if (apply_accel)
+ {
+ input = accel_fn(input, time);
}
- input = accel_fn(input, time);
input.x *= sensitivity.x;
input.y *= sensitivity.y;