Skip to content
Permalink
Browse files

Android minor changes

  • Loading branch information...
weihuoya committed Jan 21, 2019
1 parent 3397824 commit bddd0fb44e7f0765d3446610c703c8e97fd23f80

This file was deleted.

@@ -262,6 +262,9 @@ public void onClick(DialogInterface dialog, int which)
SingleChoiceSetting scSetting = (SingleChoiceSetting) mClickedItem;

int value = getValueForSingleChoiceSelection(scSetting, which);
if (scSetting.getSelectedValue() != value)
mView.onSettingChanged();

MenuTag menuTag = scSetting.getMenuTag();
if (menuTag != null)
{
@@ -313,6 +316,9 @@ else if (mClickedItem instanceof StringSingleChoiceSetting)
{
StringSingleChoiceSetting scSetting = (StringSingleChoiceSetting) mClickedItem;
String value = scSetting.getValueAt(which);
if (!scSetting.getSelectedValue().equals(value))
mView.onSettingChanged();

StringSetting setting = scSetting.setSelectedValue(value);
if (setting != null)
{
@@ -324,6 +330,9 @@ else if (mClickedItem instanceof StringSingleChoiceSetting)
else if (mClickedItem instanceof SliderSetting)
{
SliderSetting sliderSetting = (SliderSetting) mClickedItem;
if (sliderSetting.getSelectedValue() != mSeekbarProgress)
mView.onSettingChanged();

if (sliderSetting.isPercentSetting() || sliderSetting.getSetting() instanceof FloatSetting)
{
float value;
@@ -355,7 +364,6 @@ else if (mClickedItem instanceof SliderSetting)
closeDialog();
}

mView.onSettingChanged();
mClickedItem = null;
mSeekbarProgress = -1;
}
@@ -453,7 +453,7 @@ private void addEnhanceSettings(ArrayList<SettingsItem> sl)
R.string.internal_resolution, R.string.internal_resolution_description,
R.array.internalResolutionEntries, R.array.internalResolutionValues, 1, resolution));
sl.add(new SingleChoiceSetting(SettingsFile.KEY_FSAA, Settings.SECTION_GFX_SETTINGS,
R.string.FSAA, R.string.FSAA_description, R.array.FSAAEntries, R.array.FSAAValues, 0,
R.string.FSAA, R.string.FSAA_description, R.array.FSAAEntries, R.array.FSAAValues, 1,
fsaa));
sl.add(new SingleChoiceSetting(SettingsFile.KEY_ANISOTROPY, Settings.SECTION_GFX_ENHANCEMENTS,
R.string.anisotropic_filtering, R.string.anisotropic_filtering_description,
@@ -530,7 +530,7 @@ private void addEnhanceSettings(ArrayList<SettingsItem> sl)
if (shaderFiles != null)
{
String[] result = new String[shaderFiles.length + 1];
result[0] = "Off";
result[0] = mView.getActivity().getString(R.string.off);
for (int i = 0; i < shaderFiles.length; i++)
{
String name = shaderFiles[i].getName();
@@ -1,6 +1,7 @@
package org.dolphinemu.dolphinemu.features.settings.utils;

import android.support.annotation.NonNull;
import android.text.TextUtils;

import org.dolphinemu.dolphinemu.NativeLibrary;
import org.dolphinemu.dolphinemu.features.settings.model.BooleanSetting;
@@ -715,9 +716,11 @@ private static void writeSection(PrintWriter writer, SettingSection section)
for (String key : sortedKeySet)
{
Setting setting = settings.get(key);
String settingString = settingAsString(setting);

writer.println(settingString);
String valueAsString = setting.getValueAsString();
if (!TextUtils.isEmpty(valueAsString))
{
writer.println(setting.getKey() + " = " + valueAsString);
}
}
}

@@ -726,11 +729,6 @@ private static String sectionAsString(SettingSection section)
return "[" + section.getName() + "]";
}

private static String settingAsString(Setting setting)
{
return setting.getKey() + " = " + setting.getValueAsString();
}

private static String customWiimoteExtSettingAsString(Setting setting)
{
return setting.getKey().substring(0, setting.getKey().length() - 1) + " = " +
@@ -6,10 +6,7 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/list_settings"
android:background="@android:color/white"
android:elevation="@dimen/elevation_high"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

</org.dolphinemu.dolphinemu.features.settings.ui.SettingsFrameLayout>
</org.dolphinemu.dolphinemu.features.settings.ui.SettingsFrameLayout>
@@ -143,14 +143,16 @@

<!-- FSAA Preference -->
<string-array name="FSAAEntries" translatable="false">
<item>1x</item>
<item>Off</item>
<item>2x</item>
<item>4x</item>
<item>8x</item>
</string-array>
<integer-array name="FSAAValues" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>4</item>
<item>8</item>
</integer-array>

<!-- Anisotropic Filtering Preference -->
@@ -248,6 +248,7 @@
<string name="yes">Yes</string>
<string name="no">No</string>
<string name="ok">OK</string>
<string name="off">Off</string>
<string name="cancel">Cancel</string>
<string name="clear">Clear</string>
<string name="disabled">Disabled</string>

0 comments on commit bddd0fb

Please sign in to comment.
You can’t perform that action at this time.