bump up control version

This commit is contained in:
SerpentSpirale 2021-09-10 11:44:51 +02:00 committed by SerpentSpirale
parent 6bbc2f1c2f
commit d3e6a882bd
2 changed files with 4 additions and 4 deletions

View File

@ -51,13 +51,13 @@ public class CustomControls {
this.mControlDataList.add(new ControlData(ctx, R.string.control_jump, new int[]{LWJGLGLFWKeycode.GLFW_KEY_SPACE}, "${right} - ${margin} * 2 - ${width}", "${bottom} - ${margin} * 2 - ${height}", true));
//The default controls are conform to the V2
version = 3;
version = 4;
}
public void save(String path) throws IOException {
//Current version is the V2.3 so the version as to be marked as 3 !
version = 3;
//Current version is the V2.4 so the version as to be marked as 4 !
version = 4;
Tools.write(path, Tools.GLOBAL_GSON.toJson(this));
}

View File

@ -28,7 +28,7 @@ public class LayoutConverter {
CustomControls layout = LayoutConverter.convertV2Layout(layoutJobj);
layout.save(jsonPath);
return layout;
}else if (layoutJobj.getInt("version") == 3) {
}else if (layoutJobj.getInt("version") == 3 || layoutJobj.getInt("version") == 4) {
return Tools.GLOBAL_GSON.fromJson(jsonLayoutData, CustomControls.class);
}else{
return null;