From 4fc7c55d4dc553e77121da1f8927f4d206f205c5 Mon Sep 17 00:00:00 2001 From: Ender's Games Date: Sat, 11 Aug 2018 21:52:12 -0400 Subject: [PATCH] Android: Disable the boot disk option until valid This option saves a path for an unimplemented feature. Rather than continue to field questions about how to use it because it is not connected to anything, it is better to disable it for now. --- .../emulator/config/OptionsFragment.java | 62 +++++++++---------- .../main/res/layout/configure_fragment.xml | 50 +++++++-------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java index c33de65d8..ed619ef59 100644 --- a/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java +++ b/shell/android-studio/reicast/src/main/java/com/reicast/emulator/config/OptionsFragment.java @@ -480,36 +480,36 @@ public class OptionsFragment extends Fragment { modifier_volumes.setChecked(Emulator.modvols); modifier_volumes.setOnCheckedChangeListener(mod_volumes); - final EditText bootdiskEdit = (EditText) getView().findViewById(R.id.boot_disk); - String disk = Emulator.bootdisk; - if (disk != null && disk.contains("/")) { - bootdiskEdit.setText(disk.substring(disk.lastIndexOf("/"), - disk.length())); - } else { - bootdiskEdit.setText(disk); - } - - bootdiskEdit.addTextChangedListener(new TextWatcher() { - public void afterTextChanged(Editable s) { - if (bootdiskEdit.getText() != null) { - String disk = bootdiskEdit.getText().toString(); - if (disk.contains("/")) { - bootdiskEdit.setText(disk.substring(disk.lastIndexOf("/"), - disk.length())); - } else { - bootdiskEdit.setText(disk); - } - mPrefs.edit().putString(Emulator.pref_bootdisk, disk).apply(); - Emulator.bootdisk = disk; - } - } - - public void beforeTextChanged(CharSequence s, int start, int count, int after) { - } - - public void onTextChanged(CharSequence s, int start, int before, int count) { - } - }); +// final EditText bootdiskEdit = (EditText) getView().findViewById(R.id.boot_disk); +// String disk = Emulator.bootdisk; +// if (disk != null && disk.contains("/")) { +// bootdiskEdit.setText(disk.substring(disk.lastIndexOf("/"), +// disk.length())); +// } else { +// bootdiskEdit.setText(disk); +// } +// +// bootdiskEdit.addTextChangedListener(new TextWatcher() { +// public void afterTextChanged(Editable s) { +// if (bootdiskEdit.getText() != null) { +// String disk = bootdiskEdit.getText().toString(); +// if (disk.contains("/")) { +// bootdiskEdit.setText(disk.substring(disk.lastIndexOf("/"), +// disk.length())); +// } else { +// bootdiskEdit.setText(disk); +// } +// mPrefs.edit().putString(Emulator.pref_bootdisk, disk).apply(); +// Emulator.bootdisk = disk; +// } +// } +// +// public void beforeTextChanged(CharSequence s, int start, int count, int after) { +// } +// +// public void onTextChanged(CharSequence s, int start, int before, int count) { +// } +// }); final CompoundButton fps_opt = (CompoundButton) getView().findViewById(R.id.fps_option); OnCheckedChangeListener fps_options = new OnCheckedChangeListener() { @@ -721,7 +721,7 @@ public class OptionsFragment extends Fragment { mPrefs.edit().remove(Emulator.pref_pvrrender).apply(); mPrefs.edit().remove(Emulator.pref_syncedrender).apply(); mPrefs.edit().remove(Emulator.pref_modvols).apply(); - mPrefs.edit().remove(Emulator.pref_bootdisk).apply(); +// mPrefs.edit().remove(Emulator.pref_bootdisk).apply(); mPrefs.edit().remove(Config.pref_showfps).apply(); mPrefs.edit().remove(Config.pref_rendertype).apply(); mPrefs.edit().remove(Emulator.pref_nosound).apply(); diff --git a/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml b/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml index 007eff127..182e163dc 100644 --- a/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml +++ b/shell/android-studio/reicast/src/main/res/layout/configure_fragment.xml @@ -747,34 +747,34 @@ - + + + + + - + + + + + + - + + + + - - - - + + + + + + + + + +