1
0
forked from Clones/Controlify

joystick axis rendering (no textures), improve config error handling and fix joystick deadzones being unordered

This commit is contained in:
isXander
2023-02-17 00:46:40 +00:00
parent fa1a3331e6
commit 8e31472c07
89 changed files with 169 additions and 104 deletions

View File

@ -105,8 +105,14 @@ public class ControlifyConfig {
}
private void applyControllerConfig(Controller<?, ?> controller, JsonObject object) {
controller.setConfig(GSON, object.getAsJsonObject("config"));
controller.bindings().fromJson(object.getAsJsonObject("bindings"));
try {
controller.setConfig(GSON, object.getAsJsonObject("config"));
controller.bindings().fromJson(object.getAsJsonObject("bindings"));
} catch (Exception e) {
Controlify.LOGGER.error("Failed to load controller data for " + controller.uid() + ". Resetting to default!", e);
controller.resetConfig();
save();
}
}
public GlobalSettings globalSettings() {