diff Source/Mappings/Control/TouchkeyControlMapping.cpp @ 41:85577160a0d4

Many changes: implement global application preferences on devices etc.; extended editor window support with Control mapping features for now
author Andrew McPherson <andrewm@eecs.qmul.ac.uk>
date Sat, 21 Jun 2014 23:32:33 +0100
parents c6f30c1e2bda
children
line wrap: on
line diff
--- a/Source/Mappings/Control/TouchkeyControlMapping.cpp	Fri Mar 21 23:13:19 2014 +0000
+++ b/Source/Mappings/Control/TouchkeyControlMapping.cpp	Sat Jun 21 23:32:33 2014 +0100
@@ -366,12 +366,12 @@
                     if(latestValue > 0)
                         latestValue = 0;
                 }
+                
+                if(direction_ == kDirectionNegative)
+                    latestValue = -latestValue;
+                else if((direction_ == kDirectionBoth) && latestValue < 0)
+                    latestValue = -latestValue;
             }
-
-            if(direction_ == kDirectionNegative)
-                latestValue = -latestValue;
-            else if((direction_ == kDirectionBoth) && latestValue < 0)
-                latestValue = -latestValue;
             
             sendControlMessage(latestValue);
             lastControlValue_ = latestValue;