Merge pull request #8854 from Ebola16/ASD2

Android: Add option to disallow SD card writes
This commit is contained in:
Anthony 2020-06-09 10:40:19 -07:00 committed by GitHub
commit 70ce62adf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -381,16 +381,20 @@ public final class SettingsFragmentPresenter
private void addWiiSettings(ArrayList<SettingsItem> sl) private void addWiiSettings(ArrayList<SettingsItem> sl)
{ {
Setting wiiSDCard = null; Setting wiiSDCard = null;
Setting wiiSDWrites = null;
Setting continuousScan = null; Setting continuousScan = null;
Setting wiimoteSpeaker = null; Setting wiimoteSpeaker = null;
SettingSection coreSection = mSettings.getSection(Settings.SECTION_INI_CORE); SettingSection coreSection = mSettings.getSection(Settings.SECTION_INI_CORE);
wiiSDCard = coreSection.getSetting(SettingsFile.KEY_WII_SD_CARD); wiiSDCard = coreSection.getSetting(SettingsFile.KEY_WII_SD_CARD);
wiiSDWrites = coreSection.getSetting(SettingsFile.KEY_WII_SD_CARD_ALLOW_WRITES);
continuousScan = coreSection.getSetting(SettingsFile.KEY_WIIMOTE_SCAN); continuousScan = coreSection.getSetting(SettingsFile.KEY_WIIMOTE_SCAN);
wiimoteSpeaker = coreSection.getSetting(SettingsFile.KEY_WIIMOTE_SPEAKER); wiimoteSpeaker = coreSection.getSetting(SettingsFile.KEY_WIIMOTE_SPEAKER);
sl.add(new CheckBoxSetting(SettingsFile.KEY_WII_SD_CARD, Settings.SECTION_INI_CORE, sl.add(new CheckBoxSetting(SettingsFile.KEY_WII_SD_CARD, Settings.SECTION_INI_CORE,
R.string.insert_sd_card, R.string.insert_sd_card_description, true, wiiSDCard)); R.string.insert_sd_card, R.string.insert_sd_card_description, true, wiiSDCard));
sl.add(new CheckBoxSetting(SettingsFile.KEY_WII_SD_CARD_ALLOW_WRITES, Settings.SECTION_INI_CORE,
R.string.wii_sd_card_allow_writes, 0, true, wiiSDWrites));
sl.add(new CheckBoxSetting(SettingsFile.KEY_WIIMOTE_SCAN, Settings.SECTION_INI_CORE, sl.add(new CheckBoxSetting(SettingsFile.KEY_WIIMOTE_SCAN, Settings.SECTION_INI_CORE,
R.string.wiimote_scanning, R.string.wiimote_scanning_description, true, R.string.wiimote_scanning, R.string.wiimote_scanning_description, true,
continuousScan)); continuousScan));

View File

@ -279,6 +279,7 @@ public final class SettingsFile
public static final String KEY_WIIBIND_TURNTABLE_CROSSFADE_RIGHT = "TurntableCrossRight_"; public static final String KEY_WIIBIND_TURNTABLE_CROSSFADE_RIGHT = "TurntableCrossRight_";
public static final String KEY_WII_SD_CARD = "WiiSDCard"; public static final String KEY_WII_SD_CARD = "WiiSDCard";
public static final String KEY_WII_SD_CARD_ALLOW_WRITES = "WiiSDCardAllowWrites";
public static final String KEY_WIIMOTE_SCAN = "WiimoteContinuousScanning"; public static final String KEY_WIIMOTE_SCAN = "WiimoteContinuousScanning";
public static final String KEY_WIIMOTE_SPEAKER = "WiimoteEnableSpeaker"; public static final String KEY_WIIMOTE_SPEAKER = "WiimoteEnableSpeaker";

View File

@ -134,6 +134,7 @@
<string name="wii_submenu">Wii</string> <string name="wii_submenu">Wii</string>
<string name="insert_sd_card">Insert SD Card</string> <string name="insert_sd_card">Insert SD Card</string>
<string name="insert_sd_card_description">Supports SD and SDHC. Default size is 128 MB.</string> <string name="insert_sd_card_description">Supports SD and SDHC. Default size is 128 MB.</string>
<string name="wii_sd_card_allow_writes">Allow Writes to SD Card</string>
<string name="wiimote_scanning">Wii Remote Continuous Scanning</string> <string name="wiimote_scanning">Wii Remote Continuous Scanning</string>
<string name="wiimote_scanning_description">Leave this on if you are using a DolphinBar for real Wiimote support.</string> <string name="wiimote_scanning_description">Leave this on if you are using a DolphinBar for real Wiimote support.</string>
<string name="wiimote_speaker">Wii Remote Speaker</string> <string name="wiimote_speaker">Wii Remote Speaker</string>