mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 14:16:58 -04:00
fix[TouchController]: Fixed slider preferences of TouchController vibrate length
This commit is contained in:
parent
0765ce7991
commit
71a28fa5fb
@ -13,6 +13,7 @@ import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
|||||||
|
|
||||||
public class LauncherPreferenceControlFragment extends LauncherPreferenceFragment {
|
public class LauncherPreferenceControlFragment extends LauncherPreferenceFragment {
|
||||||
private boolean mGyroAvailable = false;
|
private boolean mGyroAvailable = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreatePreferences(Bundle b, String str) {
|
public void onCreatePreferences(Bundle b, String str) {
|
||||||
// Get values
|
// Get values
|
||||||
@ -20,6 +21,7 @@ public class LauncherPreferenceControlFragment extends LauncherPreferenceFragmen
|
|||||||
int prefButtonSize = (int) LauncherPreferences.PREF_BUTTONSIZE;
|
int prefButtonSize = (int) LauncherPreferences.PREF_BUTTONSIZE;
|
||||||
int mouseScale = (int) (LauncherPreferences.PREF_MOUSESCALE * 100);
|
int mouseScale = (int) (LauncherPreferences.PREF_MOUSESCALE * 100);
|
||||||
int gyroSampleRate = LauncherPreferences.PREF_GYRO_SAMPLE_RATE;
|
int gyroSampleRate = LauncherPreferences.PREF_GYRO_SAMPLE_RATE;
|
||||||
|
int touchControllerVibrateLength = LauncherPreferences.PREF_TOUCHCONTROLLER_VIBRATE_LENGTH;
|
||||||
float mouseSpeed = LauncherPreferences.PREF_MOUSESPEED;
|
float mouseSpeed = LauncherPreferences.PREF_MOUSESPEED;
|
||||||
float gyroSpeed = LauncherPreferences.PREF_GYRO_SENSITIVITY;
|
float gyroSpeed = LauncherPreferences.PREF_GYRO_SENSITIVITY;
|
||||||
float joystickDeadzone = LauncherPreferences.PREF_DEADZONE_SCALE;
|
float joystickDeadzone = LauncherPreferences.PREF_DEADZONE_SCALE;
|
||||||
@ -71,6 +73,13 @@ public class LauncherPreferenceControlFragment extends LauncherPreferenceFragmen
|
|||||||
CustomSeekBarPreference.class);
|
CustomSeekBarPreference.class);
|
||||||
gyroSampleRateSeek.setValue(gyroSampleRate);
|
gyroSampleRateSeek.setValue(gyroSampleRate);
|
||||||
gyroSampleRateSeek.setSuffix(" ms");
|
gyroSampleRateSeek.setSuffix(" ms");
|
||||||
|
|
||||||
|
CustomSeekBarPreference touchControllerVibrateLengthSeek = requirePreference(
|
||||||
|
"touchControllerVibrateLength",
|
||||||
|
CustomSeekBarPreference.class);
|
||||||
|
touchControllerVibrateLengthSeek.setValue(touchControllerVibrateLength);
|
||||||
|
touchControllerVibrateLengthSeek.setSuffix(" ms");
|
||||||
|
|
||||||
computeVisibility();
|
computeVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user