1
0
forked from Clones/Controlify

controller hid identification + ps4 buttons

This commit is contained in:
isXander
2023-02-03 19:23:08 +00:00
parent 5bd390f2b1
commit c9b0870af3
54 changed files with 302 additions and 44 deletions

View File

@ -57,7 +57,7 @@ public class ControlifyConfig {
for (var controller : Controller.CONTROLLERS.values()) {
// `add` replaces if already existing
// TODO: find a better way to identify controllers, GUID will report the same for multiple controllers of the same model
newControllerData.add(controller.guid(), generateControllerConfig(controller));
newControllerData.add(controller.uid(), generateControllerConfig(controller));
}
controllerData = newControllerData;
@ -84,7 +84,7 @@ public class ControlifyConfig {
JsonObject controllers = object.getAsJsonObject("controllers");
if (controllers != null) {
for (var controller : Controller.CONTROLLERS.values()) {
var settings = controllers.getAsJsonObject(controller.guid());
var settings = controllers.getAsJsonObject(controller.uid());
if (settings != null) {
applyControllerConfig(controller, settings);
}