From c8fe9f82a5105de1d40cf275c2e780f0cb4f7d51 Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Tue, 10 Dec 2013 01:09:06 -0500 Subject: [PATCH] fixed typo that caused gamepad to not work properly --- limelight-pc/src/com/limelight/gui/StreamFrame.java | 2 +- limelight-pc/src/com/limelight/input/GamepadHandler.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/limelight-pc/src/com/limelight/gui/StreamFrame.java b/limelight-pc/src/com/limelight/gui/StreamFrame.java index 5f16ea1..ce555fd 100644 --- a/limelight-pc/src/com/limelight/gui/StreamFrame.java +++ b/limelight-pc/src/com/limelight/gui/StreamFrame.java @@ -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) { diff --git a/limelight-pc/src/com/limelight/input/GamepadHandler.java b/limelight-pc/src/com/limelight/input/GamepadHandler.java index 598bc3a..480ff85 100644 --- a/limelight-pc/src/com/limelight/input/GamepadHandler.java +++ b/limelight-pc/src/com/limelight/input/GamepadHandler.java @@ -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); } }