mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-23 16:46:48 +00:00
fixed typo that caused gamepad to not work properly
This commit is contained in:
@@ -56,7 +56,6 @@ public class StreamFrame extends JFrame {
|
|||||||
this.setLocation(getLocation().x, dim.height/2-this.getSize().height/2);
|
this.setLocation(getLocation().x, dim.height/2-this.getSize().height/2);
|
||||||
}
|
}
|
||||||
hideCursor();
|
hideCursor();
|
||||||
|
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,6 +79,7 @@ public class StreamFrame extends JFrame {
|
|||||||
|
|
||||||
// Set the blank cursor to the JFrame.
|
// Set the blank cursor to the JFrame.
|
||||||
this.getContentPane().setCursor(blankCursor);
|
this.getContentPane().setCursor(blankCursor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showSpinner(Stage stage) {
|
public void showSpinner(Stage stage) {
|
||||||
|
|||||||
@@ -163,9 +163,9 @@ public class GamepadHandler {
|
|||||||
} else if (id == Component.Identifier.Axis.Y) {
|
} else if (id == Component.Identifier.Axis.Y) {
|
||||||
leftStickY = (short)Math.round(-value * 0x7FFF);
|
leftStickY = (short)Math.round(-value * 0x7FFF);
|
||||||
} else if (id == Component.Identifier.Axis.Z) {
|
} 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) {
|
} else if (id == Component.Identifier.Axis.RZ) {
|
||||||
rightTrigger = (byte)Math.round((value + 2) / 2 * 0xFF);
|
rightTrigger = (byte)Math.round((value + 1) / 2 * 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user