Cleanup: fix typo

This commit is contained in:
Mathias-Boulay 2023-03-05 18:52:02 +01:00
parent 17d64faf29
commit ac3dcba776
3 changed files with 8 additions and 8 deletions

View File

@ -88,7 +88,7 @@ public class MainActivity extends BaseActivity implements ControlButtonMenuListe
initLayout(R.layout.activity_basemain);
CallbackBridge.addGrabListener(touchpad);
CallbackBridge.addGrabListener(minecraftGLView);
if(LauncherPreferences.PREF_ENALBE_GYRO) mGyroControl = new GyroControl(this);
if(LauncherPreferences.PREF_ENABLE_GYRO) mGyroControl = new GyroControl(this);
// Enabling this on TextureView results in a broken white result
if(PREF_USE_ALTERNATE_SURFACE) getWindow().setBackgroundDrawable(null);
@ -514,7 +514,7 @@ public class MainActivity extends BaseActivity implements ControlButtonMenuListe
int tmpGyroSensitivity;
public void adjustGyroSensitivityLive() {
if(!LauncherPreferences.PREF_ENALBE_GYRO) {
if(!LauncherPreferences.PREF_ENABLE_GYRO) {
Toast.makeText(this, R.string.toast_turn_on_gyro, Toast.LENGTH_LONG).show();
return;
}

View File

@ -49,7 +49,7 @@ public class LauncherPreferences {
public static boolean PREF_USE_ALTERNATE_SURFACE = true;
public static boolean PREF_JAVA_SANDBOX = true;
public static int PREF_SCALE_FACTOR = 100;
public static boolean PREF_ENALBE_GYRO = false;
public static boolean PREF_ENABLE_GYRO = false;
public static float PREF_GYRO_SENSITIVITY = 1f;
public static int PREF_GYRO_SAMPLE_RATE = 16;
@ -89,7 +89,7 @@ public class LauncherPreferences {
PREF_USE_ALTERNATE_SURFACE = DEFAULT_PREF.getBoolean("alternate_surface", false);
PREF_JAVA_SANDBOX = DEFAULT_PREF.getBoolean("java_sandbox", true);
PREF_SCALE_FACTOR = DEFAULT_PREF.getInt("resolutionRatio", 100);
PREF_ENALBE_GYRO = DEFAULT_PREF.getBoolean("enableGyro", false);
PREF_ENABLE_GYRO = DEFAULT_PREF.getBoolean("enableGyro", false);
PREF_GYRO_SENSITIVITY = ((float)DEFAULT_PREF.getInt("gyroSensitivity", 100))/100f;
PREF_GYRO_SAMPLE_RATE = DEFAULT_PREF.getInt("gyroSampleRate", 16);
PREF_GYRO_INVERT_X = DEFAULT_PREF.getBoolean("gyroInvertX", false);

View File

@ -74,10 +74,10 @@ public class LauncherPreferenceControlFragment extends LauncherPreferenceFragmen
private void computeVisibility(){
findPreference("timeLongPressTrigger").setVisible(!LauncherPreferences.PREF_DISABLE_GESTURES);
findPreference("gyroSensitivity").setVisible(LauncherPreferences.PREF_ENALBE_GYRO);
findPreference("gyroSampleRate").setVisible(LauncherPreferences.PREF_ENALBE_GYRO);
findPreference("gyroInvertX").setVisible(LauncherPreferences.PREF_ENALBE_GYRO);
findPreference("gyroInvertY").setVisible(LauncherPreferences.PREF_ENALBE_GYRO);
findPreference("gyroSensitivity").setVisible(LauncherPreferences.PREF_ENABLE_GYRO);
findPreference("gyroSampleRate").setVisible(LauncherPreferences.PREF_ENABLE_GYRO);
findPreference("gyroInvertX").setVisible(LauncherPreferences.PREF_ENABLE_GYRO);
findPreference("gyroInvertY").setVisible(LauncherPreferences.PREF_ENABLE_GYRO);
}
}