fixed typo that caused gamepad to not work properly

This commit is contained in:
Diego Waxemberg
2013-12-10 01:09:06 -05:00
parent 8e9d0f9844
commit c8fe9f82a5
2 changed files with 3 additions and 3 deletions

View File

@@ -56,7 +56,6 @@ public class StreamFrame extends JFrame {
this.setLocation(getLocation().x, dim.height/2-this.getSize().height/2);
}
hideCursor();
this.setVisible(true);
}
@@ -80,6 +79,7 @@ public class StreamFrame extends JFrame {
// Set the blank cursor to the JFrame.
this.getContentPane().setCursor(blankCursor);
}
public void showSpinner(Stage stage) {

View File

@@ -163,9 +163,9 @@ public class GamepadHandler {
} else if (id == Component.Identifier.Axis.Y) {
leftStickY = (short)Math.round(-value * 0x7FFF);
} else if (id == Component.Identifier.Axis.Z) {
leftTrigger = (byte)Math.round((value + 1 / 2) * 0xFF);
leftTrigger = (byte)Math.round((value + 1) / 2 * 0xFF);
} else if (id == Component.Identifier.Axis.RZ) {
rightTrigger = (byte)Math.round((value + 2) / 2 * 0xFF);
rightTrigger = (byte)Math.round((value + 1) / 2 * 0xFF);
}
}