mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge pull request #7292 from mahdihijazi/settings_refactor
Android: Settings refactor & Fix custom game settings
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.settings.SettingsActivity"
|
||||
android:name=".features.settings.ui.SettingsActivity"
|
||||
android:theme="@style/DolphinSettingsGamecube"
|
||||
android:label="@string/preferences_settings"/>
|
||||
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ import org.dolphinemu.dolphinemu.R;
|
||||
import org.dolphinemu.dolphinemu.activities.EmulationActivity;
|
||||
import org.dolphinemu.dolphinemu.model.GameFile;
|
||||
import org.dolphinemu.dolphinemu.services.DirectoryInitializationService;
|
||||
import org.dolphinemu.dolphinemu.ui.settings.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.ui.settings.SettingsActivity;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity;
|
||||
import org.dolphinemu.dolphinemu.utils.PicassoUtils;
|
||||
import org.dolphinemu.dolphinemu.viewholders.GameViewHolder;
|
||||
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ import org.dolphinemu.dolphinemu.R;
|
||||
import org.dolphinemu.dolphinemu.model.GameFile;
|
||||
import org.dolphinemu.dolphinemu.services.DirectoryInitializationService;
|
||||
import org.dolphinemu.dolphinemu.ui.platform.Platform;
|
||||
import org.dolphinemu.dolphinemu.ui.settings.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.ui.settings.SettingsActivity;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity;
|
||||
import org.dolphinemu.dolphinemu.utils.PicassoUtils;
|
||||
import org.dolphinemu.dolphinemu.viewholders.TvGameViewHolder;
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.view.InputBindingSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.view.InputBindingSetting;
|
||||
import org.dolphinemu.dolphinemu.utils.ControllerMappingHelper;
|
||||
import org.dolphinemu.dolphinemu.utils.Log;
|
||||
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
public final class BooleanSetting extends Setting
|
||||
{
|
||||
private boolean mValue;
|
||||
|
||||
public BooleanSetting(String key, String section, int file, boolean value)
|
||||
public BooleanSetting(String key, String section, boolean value)
|
||||
{
|
||||
super(key, section, file);
|
||||
super(key, section);
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
public final class FloatSetting extends Setting
|
||||
{
|
||||
private float mValue;
|
||||
|
||||
public FloatSetting(String key, String section, int file, float value)
|
||||
public FloatSetting(String key, String section, float value)
|
||||
{
|
||||
super(key, section, file);
|
||||
super(key, section);
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
+6
-6
@@ -1,21 +1,21 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
import org.dolphinemu.dolphinemu.ui.settings.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||
|
||||
public final class IntSetting extends Setting
|
||||
{
|
||||
private int mValue;
|
||||
private MenuTag menuTag;
|
||||
|
||||
public IntSetting(String key, String section, int file, int value)
|
||||
public IntSetting(String key, String section, int value)
|
||||
{
|
||||
super(key, section, file);
|
||||
super(key, section);
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
public IntSetting(String key, String section, int file, int value, MenuTag menuTag)
|
||||
public IntSetting(String key, String section, int value, MenuTag menuTag)
|
||||
{
|
||||
super(key, section, file);
|
||||
super(key, section);
|
||||
mValue = value;
|
||||
this.menuTag = menuTag;
|
||||
}
|
||||
+2
-13
@@ -1,4 +1,4 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
/**
|
||||
* Abstraction for a setting item as read from / written to Dolphin's configuration ini files.
|
||||
@@ -10,20 +10,17 @@ public abstract class Setting
|
||||
{
|
||||
private String mKey;
|
||||
private String mSection;
|
||||
private int mFile;
|
||||
|
||||
/**
|
||||
* Base constructor.
|
||||
*
|
||||
* @param key Everything to the left of the = in a line from the ini file.
|
||||
* @param section The corresponding recent section header; e.g. [Core] or [Enhancements] without the brackets.
|
||||
* @param file The ini file the Setting is stored in.
|
||||
*/
|
||||
public Setting(String key, String section, int file)
|
||||
public Setting(String key, String section)
|
||||
{
|
||||
mKey = key;
|
||||
mSection = section;
|
||||
mFile = file;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,14 +41,6 @@ public abstract class Setting
|
||||
return mSection;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The ini file the Setting is stored in.
|
||||
*/
|
||||
public int getFile()
|
||||
{
|
||||
return mFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return A representation of this Setting's backing value converted to a String (e.g. for serialization).
|
||||
+9
-1
@@ -1,4 +1,4 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -52,4 +52,12 @@ public final class SettingSection
|
||||
{
|
||||
return mSettings;
|
||||
}
|
||||
|
||||
public void mergeSection(SettingSection settingSection)
|
||||
{
|
||||
for (Setting setting : settingSection.mSettings.values())
|
||||
{
|
||||
putSetting(setting);
|
||||
}
|
||||
}
|
||||
}
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivityView;
|
||||
import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class Settings
|
||||
{
|
||||
public static final String SECTION_INI_CORE = "Core";
|
||||
public static final String SECTION_INI_INTERFACE = "Interface";
|
||||
|
||||
public static final String SECTION_GFX_SETTINGS = "Settings";
|
||||
public static final String SECTION_GFX_ENHANCEMENTS = "Enhancements";
|
||||
public static final String SECTION_GFX_HACKS = "Hacks";
|
||||
|
||||
public static final String SECTION_STEREOSCOPY = "Stereoscopy";
|
||||
|
||||
public static final String SECTION_WIIMOTE = "Wiimote";
|
||||
|
||||
public static final String SECTION_BINDINGS = "Android";
|
||||
|
||||
private String gameId;
|
||||
|
||||
private static final Map<String, List<String>> configFileSectionsMap = new HashMap<>();
|
||||
|
||||
static
|
||||
{
|
||||
configFileSectionsMap.put(SettingsFile.FILE_NAME_DOLPHIN, Arrays.asList(SECTION_INI_CORE, SECTION_INI_INTERFACE, SECTION_BINDINGS));
|
||||
configFileSectionsMap.put(SettingsFile.FILE_NAME_GFX, Arrays.asList(SECTION_GFX_SETTINGS, SECTION_GFX_ENHANCEMENTS, SECTION_GFX_HACKS, SECTION_STEREOSCOPY));
|
||||
configFileSectionsMap.put(SettingsFile.FILE_NAME_WIIMOTE, Arrays.asList(SECTION_WIIMOTE + 1, SECTION_WIIMOTE + 2, SECTION_WIIMOTE + 3, SECTION_WIIMOTE + 4));
|
||||
}
|
||||
|
||||
/**
|
||||
* A HashMap<String, SettingSection> that constructs a new SettingSection instead of returning null
|
||||
* when getting a key not already in the map
|
||||
*/
|
||||
public static final class SettingsSectionMap extends HashMap<String, SettingSection>
|
||||
{
|
||||
@Override
|
||||
public SettingSection get(Object key)
|
||||
{
|
||||
if (!(key instanceof String))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String stringKey = (String) key;
|
||||
|
||||
if (!super.containsKey(stringKey))
|
||||
{
|
||||
SettingSection section = new SettingSection(stringKey);
|
||||
super.put(stringKey, section);
|
||||
return section;
|
||||
}
|
||||
return super.get(key);
|
||||
}
|
||||
}
|
||||
|
||||
private HashMap<String, SettingSection> sections = new Settings.SettingsSectionMap();
|
||||
|
||||
public SettingSection getSection(String sectionName)
|
||||
{
|
||||
return sections.get(sectionName);
|
||||
}
|
||||
|
||||
public boolean isEmpty()
|
||||
{
|
||||
return sections.isEmpty();
|
||||
}
|
||||
|
||||
public HashMap<String, SettingSection> getSections()
|
||||
{
|
||||
return sections;
|
||||
}
|
||||
|
||||
public void loadSettings(SettingsActivityView view)
|
||||
{
|
||||
sections = new Settings.SettingsSectionMap();
|
||||
|
||||
HashSet<String> filesToExclude = new HashSet<>();
|
||||
if (!TextUtils.isEmpty(gameId))
|
||||
{
|
||||
// for per-game settings, don't load the WiiMoteNew.ini settings
|
||||
filesToExclude.add(SettingsFile.FILE_NAME_WIIMOTE);
|
||||
}
|
||||
|
||||
loadDolphinSettings(view, filesToExclude);
|
||||
|
||||
if (!TextUtils.isEmpty(gameId))
|
||||
{
|
||||
loadGenericGameSettings(gameId, view);
|
||||
loadCustomGameSettings(gameId, view);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadDolphinSettings(SettingsActivityView view, HashSet<String> filesToExclude)
|
||||
{
|
||||
for (Map.Entry<String, List<String>> entry : configFileSectionsMap.entrySet())
|
||||
{
|
||||
String fileName = entry.getKey();
|
||||
if(filesToExclude == null || !filesToExclude.contains(fileName))
|
||||
{
|
||||
sections.putAll(SettingsFile.readFile(fileName, view));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loadGenericGameSettings(String gameId, SettingsActivityView view)
|
||||
{
|
||||
// generic game settings
|
||||
mergeSections(SettingsFile.readGenericGameSettings(gameId, view));
|
||||
mergeSections(SettingsFile.readGenericGameSettingsForAllRegions(gameId, view));
|
||||
}
|
||||
|
||||
private void loadCustomGameSettings(String gameId, SettingsActivityView view)
|
||||
{
|
||||
// custom game settings
|
||||
mergeSections(SettingsFile.readCustomGameSettings(gameId, view));
|
||||
}
|
||||
|
||||
private void mergeSections(HashMap<String, SettingSection> updatedSections)
|
||||
{
|
||||
for (Map.Entry<String, SettingSection> entry : updatedSections.entrySet())
|
||||
{
|
||||
if (sections.containsKey(entry.getKey()))
|
||||
{
|
||||
SettingSection originalSection = sections.get(entry.getKey());
|
||||
SettingSection updatedSection = entry.getValue();
|
||||
originalSection.mergeSection(updatedSection);
|
||||
}
|
||||
else
|
||||
{
|
||||
sections.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void loadSettings(String gameId, SettingsActivityView view)
|
||||
{
|
||||
this.gameId = gameId;
|
||||
loadSettings(view);
|
||||
}
|
||||
|
||||
public void saveSettings(SettingsActivityView view)
|
||||
{
|
||||
if (TextUtils.isEmpty(gameId))
|
||||
{
|
||||
view.showToastMessage("Saved settings to INI files");
|
||||
|
||||
for (Map.Entry<String, List<String>> entry : configFileSectionsMap.entrySet())
|
||||
{
|
||||
String fileName = entry.getKey();
|
||||
List<String> sectionNames = entry.getValue();
|
||||
TreeMap<String, SettingSection> iniSections = new TreeMap<>();
|
||||
for (String section : sectionNames)
|
||||
{
|
||||
iniSections.put(section, sections.get(section));
|
||||
}
|
||||
|
||||
SettingsFile.saveFile(fileName, iniSections, view);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// custom game settings
|
||||
view.showToastMessage("Saved settings for " + gameId);
|
||||
SettingsFile.saveCustomGameSettings(gameId, sections);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
||||
|
||||
public final class StringSetting extends Setting
|
||||
{
|
||||
private String mValue;
|
||||
|
||||
public StringSetting(String key, String section, int file, String value)
|
||||
public StringSetting(String key, String section, String value)
|
||||
{
|
||||
super(key, section, file);
|
||||
super(key, section);
|
||||
mValue = value;
|
||||
}
|
||||
|
||||
+6
-6
@@ -1,15 +1,15 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.BooleanSetting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.BooleanSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
|
||||
public final class CheckBoxSetting extends SettingsItem
|
||||
{
|
||||
private boolean mDefaultValue;
|
||||
|
||||
public CheckBoxSetting(String key, String section, int file, int titleId, int descriptionId, boolean defaultValue, Setting setting)
|
||||
public CheckBoxSetting(String key, String section, int titleId, int descriptionId, boolean defaultValue, Setting setting)
|
||||
{
|
||||
super(key, section, file, setting, titleId, descriptionId);
|
||||
super(key, section, setting, titleId, descriptionId);
|
||||
mDefaultValue = defaultValue;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public final class CheckBoxSetting extends SettingsItem
|
||||
{
|
||||
if (getSetting() == null)
|
||||
{
|
||||
BooleanSetting setting = new BooleanSetting(getKey(), getSection(), getFile(), checked);
|
||||
BooleanSetting setting = new BooleanSetting(getKey(), getSection(), checked);
|
||||
setSetting(setting);
|
||||
return setting;
|
||||
}
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
|
||||
public final class HeaderSetting extends SettingsItem
|
||||
{
|
||||
public HeaderSetting(String key, Setting setting, int titleId, int descriptionId)
|
||||
{
|
||||
super(key, null, 0, setting, titleId, descriptionId);
|
||||
super(key, null, setting, titleId, descriptionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
+6
-7
@@ -1,14 +1,13 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.BooleanSetting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.StringSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.StringSetting;
|
||||
|
||||
public final class InputBindingSetting extends SettingsItem
|
||||
{
|
||||
public InputBindingSetting(String key, String section, int file, int titleId, Setting setting)
|
||||
public InputBindingSetting(String key, String section, int titleId, Setting setting)
|
||||
{
|
||||
super(key, section, file, setting, titleId, 0);
|
||||
super(key, section, setting, titleId, 0);
|
||||
}
|
||||
|
||||
public String getValue()
|
||||
@@ -33,7 +32,7 @@ public final class InputBindingSetting extends SettingsItem
|
||||
{
|
||||
if (getSetting() == null)
|
||||
{
|
||||
StringSetting setting = new StringSetting(getKey(), getSection(), getFile(), bind);
|
||||
StringSetting setting = new StringSetting(getKey(), getSection(), bind);
|
||||
setSetting(setting);
|
||||
return setting;
|
||||
}
|
||||
+5
-14
@@ -1,6 +1,7 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.SettingsAdapter;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
|
||||
/**
|
||||
* ViewModel abstraction for an Item in the RecyclerView powering SettingsFragments.
|
||||
@@ -21,7 +22,6 @@ public abstract class SettingsItem
|
||||
|
||||
private String mKey;
|
||||
private String mSection;
|
||||
private int mFile;
|
||||
|
||||
private Setting mSetting;
|
||||
|
||||
@@ -38,11 +38,10 @@ public abstract class SettingsItem
|
||||
* @param nameId Resource ID for a text string to be displayed as this setting's name.
|
||||
* @param descriptionId Resource ID for a text string to be displayed as this setting's description.
|
||||
*/
|
||||
public SettingsItem(String key, String section, int file, Setting setting, int nameId, int descriptionId)
|
||||
public SettingsItem(String key, String section, Setting setting, int nameId, int descriptionId)
|
||||
{
|
||||
mKey = key;
|
||||
mSection = section;
|
||||
mFile = file;
|
||||
mSetting = setting;
|
||||
mNameId = nameId;
|
||||
mDescriptionId = descriptionId;
|
||||
@@ -66,14 +65,6 @@ public abstract class SettingsItem
|
||||
return mSection;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The file the backing Setting is saved to.
|
||||
*/
|
||||
public int getFile()
|
||||
{
|
||||
return mFile;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -110,7 +101,7 @@ public abstract class SettingsItem
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by {@link org.dolphinemu.dolphinemu.ui.settings.SettingsAdapter}'s onCreateViewHolder()
|
||||
* Used by {@link SettingsAdapter}'s onCreateViewHolder()
|
||||
* method to determine which type of ViewHolder should be created.
|
||||
*
|
||||
* @return An integer (ideally, one of the constants defined in this file)
|
||||
+9
-9
@@ -1,8 +1,8 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.IntSetting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.ui.settings.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.IntSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||
|
||||
public final class SingleChoiceSetting extends SettingsItem
|
||||
{
|
||||
@@ -12,18 +12,18 @@ public final class SingleChoiceSetting extends SettingsItem
|
||||
private int mValuesId;
|
||||
private MenuTag menuTag;
|
||||
|
||||
public SingleChoiceSetting(String key, String section, int file, int titleId, int descriptionId, int choicesId, int valuesId, int defaultValue, Setting setting, MenuTag menuTag)
|
||||
public SingleChoiceSetting(String key, String section, int titleId, int descriptionId, int choicesId, int valuesId, int defaultValue, Setting setting, MenuTag menuTag)
|
||||
{
|
||||
super(key, section, file, setting, titleId, descriptionId);
|
||||
super(key, section, setting, titleId, descriptionId);
|
||||
mValuesId = valuesId;
|
||||
mChoicesId = choicesId;
|
||||
mDefaultValue = defaultValue;
|
||||
this.menuTag = menuTag;
|
||||
}
|
||||
|
||||
public SingleChoiceSetting(String key, String section, int file, int titleId, int descriptionId, int choicesId, int valuesId, int defaultValue, Setting setting)
|
||||
public SingleChoiceSetting(String key, String section, int titleId, int descriptionId, int choicesId, int valuesId, int defaultValue, Setting setting)
|
||||
{
|
||||
this(key, section, file, titleId, descriptionId, choicesId, valuesId, defaultValue, setting, null);
|
||||
this(key, section, titleId, descriptionId, choicesId, valuesId, defaultValue, setting, null);
|
||||
}
|
||||
|
||||
public int getChoicesId()
|
||||
@@ -65,7 +65,7 @@ public final class SingleChoiceSetting extends SettingsItem
|
||||
{
|
||||
if (getSetting() == null)
|
||||
{
|
||||
IntSetting setting = new IntSetting(getKey(), getSection(), getFile(), selection);
|
||||
IntSetting setting = new IntSetting(getKey(), getSection(), selection);
|
||||
setSetting(setting);
|
||||
return setting;
|
||||
}
|
||||
+9
-9
@@ -1,10 +1,10 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.FloatSetting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.IntSetting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.FloatSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.IntSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
import org.dolphinemu.dolphinemu.utils.Log;
|
||||
import org.dolphinemu.dolphinemu.utils.SettingsFile;
|
||||
import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile;
|
||||
|
||||
public final class SliderSetting extends SettingsItem
|
||||
{
|
||||
@@ -13,9 +13,9 @@ public final class SliderSetting extends SettingsItem
|
||||
|
||||
private String mUnits;
|
||||
|
||||
public SliderSetting(String key, String section, int file, int titleId, int descriptionId, int max, String units, int defaultValue, Setting setting)
|
||||
public SliderSetting(String key, String section, int titleId, int descriptionId, int max, String units, int defaultValue, Setting setting)
|
||||
{
|
||||
super(key, section, file, setting, titleId, descriptionId);
|
||||
super(key, section, setting, titleId, descriptionId);
|
||||
mMax = max;
|
||||
mUnits = units;
|
||||
mDefaultValue = defaultValue;
|
||||
@@ -71,7 +71,7 @@ public final class SliderSetting extends SettingsItem
|
||||
{
|
||||
if (getSetting() == null)
|
||||
{
|
||||
IntSetting setting = new IntSetting(getKey(), getSection(), getFile(), selection);
|
||||
IntSetting setting = new IntSetting(getKey(), getSection(), selection);
|
||||
setSetting(setting);
|
||||
return setting;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public final class SliderSetting extends SettingsItem
|
||||
{
|
||||
if (getSetting() == null)
|
||||
{
|
||||
FloatSetting setting = new FloatSetting(getKey(), getSection(), getFile(), selection);
|
||||
FloatSetting setting = new FloatSetting(getKey(), getSection(), selection);
|
||||
setSetting(setting);
|
||||
return setting;
|
||||
}
|
||||
+6
-6
@@ -1,7 +1,7 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.model.settings.StringSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.StringSetting;
|
||||
|
||||
public class StringSingleChoiceSetting extends SettingsItem
|
||||
{
|
||||
@@ -10,9 +10,9 @@ public class StringSingleChoiceSetting extends SettingsItem
|
||||
private String[] mChoicesId;
|
||||
private String[] mValuesId;
|
||||
|
||||
public StringSingleChoiceSetting(String key, String section, int file, int titleId, int descriptionId, String[] choicesId, String[] valuesId, String defaultValue, Setting setting)
|
||||
public StringSingleChoiceSetting(String key, String section, int titleId, int descriptionId, String[] choicesId, String[] valuesId, String defaultValue, Setting setting)
|
||||
{
|
||||
super(key, section, file, setting, titleId, descriptionId);
|
||||
super(key, section, setting, titleId, descriptionId);
|
||||
mValuesId = valuesId;
|
||||
mChoicesId = choicesId;
|
||||
mDefaultValue = defaultValue;
|
||||
@@ -75,7 +75,7 @@ public class StringSingleChoiceSetting extends SettingsItem
|
||||
{
|
||||
if (getSetting() == null)
|
||||
{
|
||||
StringSetting setting = new StringSetting(getKey(), getSection(), getFile(), selection);
|
||||
StringSetting setting = new StringSetting(getKey(), getSection(), selection);
|
||||
setSetting(setting);
|
||||
return setting;
|
||||
}
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
package org.dolphinemu.dolphinemu.model.settings.view;
|
||||
package org.dolphinemu.dolphinemu.features.settings.model.view;
|
||||
|
||||
import org.dolphinemu.dolphinemu.model.settings.Setting;
|
||||
import org.dolphinemu.dolphinemu.ui.settings.MenuTag;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Setting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||
|
||||
public final class SubmenuSetting extends SettingsItem
|
||||
{
|
||||
@@ -9,7 +9,7 @@ public final class SubmenuSetting extends SettingsItem
|
||||
|
||||
public SubmenuSetting(String key, Setting setting, int titleId, int descriptionId, MenuTag menuKey)
|
||||
{
|
||||
super(key, null, 0, setting, titleId, descriptionId);
|
||||
super(key, null, setting, titleId, descriptionId);
|
||||
mMenuKey = menuKey;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.dolphinemu.dolphinemu.ui.settings;
|
||||
package org.dolphinemu.dolphinemu.features.settings.ui;
|
||||
|
||||
public enum MenuTag
|
||||
{
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user