Rebonk
This commit is contained in:
@@ -42,6 +42,7 @@ public class InputMapPreferences extends BasePreferenceFragment implements Activ
|
|||||||
deadZonePreference.setOnPreferenceChangeListener((preference, value) -> {
|
deadZonePreference.setOnPreferenceChangeListener((preference, value) -> {
|
||||||
InputMap.setDeadZone(((int)value / 100.0f));
|
InputMap.setDeadZone(((int)value / 100.0f));
|
||||||
refreshList();
|
refreshList();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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[] {"{}"};
|
String[] content = new String[] {"{}"};
|
||||||
new Task(()->{
|
new Task(()->{
|
||||||
if (FileUtils.exists(getPath())) {
|
if (FileUtils.exists(getPath())) {
|
||||||
content[0] = FileUtils.readTextFile(getPath());
|
content[0] = FileUtils.readTextFile(getPath());
|
||||||
}
|
}
|
||||||
}).runSync();
|
}).runSync();
|
||||||
return gson.fromJson(content[0], clazz);
|
|
||||||
|
return gson.fromJson(content[0], myClass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user