1
0
forked from Clones/Controlify

1.1 changelog, bump version, update comparison

This commit is contained in:
isXander
2023-04-14 11:55:30 +01:00
parent 95e1ce2385
commit 20e662f927
16 changed files with 511 additions and 126 deletions

View File

@ -25,7 +25,7 @@ public abstract class AbstractController<S extends ControllerState, C extends Co
private final String guid;
private final ControllerType type;
private final ControllerBindings<S> bindings;
protected ControllerBindings<S> bindings;
protected C config, defaultConfig;
public AbstractController(int joystickId, ControllerHIDService.ControllerHIDInfo hidInfo) {
@ -37,7 +37,7 @@ public abstract class AbstractController<S extends ControllerState, C extends Co
this.joystickId = joystickId;
this.guid = GLFW.glfwGetJoystickGUID(joystickId);
if (hidInfo.path().isPresent()) {
if (hidInfo.hidDevice().isPresent()) {
this.uid = hidInfo.createControllerUID().orElseThrow();
this.type = hidInfo.type();
} else {
@ -48,8 +48,6 @@ public abstract class AbstractController<S extends ControllerState, C extends Co
var joystickName = GLFW.glfwGetJoystickName(joystickId);
String name = type != ControllerType.UNKNOWN || joystickName == null ? type.friendlyName() : joystickName;
setName(name);
this.bindings = new ControllerBindings<>(this);
}
public String name() {