mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Rebonk
This commit is contained in:
parent
f2fac171a0
commit
1c691e1690
7 changed files with 25 additions and 23 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue