Browse Source

Fix for input bug in OSX

This fixes a bug with input on OSX where if you bind a command it will now send the correct value to torque script.
Mike Lilligreen 12 years ago
parent
commit
e9d80c9d74
1 changed files with 5 additions and 2 deletions
  1. 5 2
      engine/source/platformOSX/osxTorqueView.mm

+ 5 - 2
engine/source/platformOSX/osxTorqueView.mm

@@ -236,7 +236,10 @@
     torqueEvent.modifier = modifiers;
     torqueEvent.ascii = 0;
     torqueEvent.action = action;
-    torqueEvent.fValue = 1.0;
+    if (action == SI_BREAK)
+        torqueEvent.fValue = 0.0;
+    else
+        torqueEvent.fValue = 1.0;
     
     // Post the input event
     Game->postEvent(torqueEvent);
@@ -464,4 +467,4 @@
     [self processKeyEvent:event make:NO];
 }
 
-@end
+@end