This commit is contained in:
wheremyfoodat 2023-12-26 02:24:53 +02:00
parent f2fac171a0
commit 1c691e1690
7 changed files with 25 additions and 23 deletions

View file

@ -42,6 +42,7 @@ public class InputMapPreferences extends BasePreferenceFragment implements Activ
deadZonePreference.setOnPreferenceChangeListener((preference, value) -> {
InputMap.setDeadZone(((int)value / 100.0f));
refreshList();
return false;
});

View file

@ -25,13 +25,14 @@ public class GsonConfigParser {
}
}
public <T> T load(Class<T> clazz){
public <T> T load(Class<T> myClass) {
String[] content = new String[] {"{}"};
new Task(()->{
if (FileUtils.exists(getPath())) {
content[0] = FileUtils.readTextFile(getPath());
}
}).runSync();
return gson.fromJson(content[0], clazz);
return gson.fromJson(content[0], myClass);
}
}