[Android] Add some more advanced settings
This commit is contained in:
parent
7ec2048654
commit
cd2ce7db47
|
@ -29,7 +29,9 @@
|
||||||
<string name="menuItem_appVersion">App version</string>
|
<string name="menuItem_appVersion">App version</string>
|
||||||
<string name="menuItem_hardwareInfo">Hardware info</string>
|
<string name="menuItem_hardwareInfo">Hardware info</string>
|
||||||
<string name="menuItem_forum">Help/Forum</string>
|
<string name="menuItem_forum">Help/Forum</string>
|
||||||
|
<string name="menuItem_reportBug">Report Issue</string>
|
||||||
|
<string name="content_description_app_loading_image">App loading image</string>
|
||||||
|
|
||||||
<!-- ************************************************************************** -->
|
<!-- ************************************************************************** -->
|
||||||
<!-- Toast Messages -->
|
<!-- Toast Messages -->
|
||||||
<!-- Developers: Follow punctuation and grammar as shown below -->
|
<!-- Developers: Follow punctuation and grammar as shown below -->
|
||||||
|
@ -110,7 +112,25 @@
|
||||||
<string name="Interpreter">Interpreter</string>
|
<string name="Interpreter">Interpreter</string>
|
||||||
<string name="Recompiler">Recompiler</string>
|
<string name="Recompiler">Recompiler</string>
|
||||||
<string name="SyncCores">Synchronize Cores</string>
|
<string name="SyncCores">Synchronize Cores</string>
|
||||||
|
<string name="Advanced">Advanced</string>
|
||||||
|
<string name="DisplaySpeed_title">Display Speed</string>
|
||||||
|
<string name="DisplaySpeed_summary">Show the speed of the emulation</string>
|
||||||
|
<string name="DisplaySpeedDisplay">Display Speed Display</string>
|
||||||
|
<string name="DListPerSecond">Display lists per second</string>
|
||||||
|
<string name="PercentageOfSpeed">Percentage of full speed</string>
|
||||||
|
<string name="VerticalInterruptsPerSecond">Vertical interrupts per second</string>
|
||||||
|
|
||||||
|
<string-array name="DisplaySpeed_list">
|
||||||
|
<item>@string/DListPerSecond</item>
|
||||||
|
<item>@string/PercentageOfSpeed</item>
|
||||||
|
<item>@string/VerticalInterruptsPerSecond</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="DisplaySpeed_values" translatable="false">
|
||||||
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>0</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
<string-array name="cpu_core_list">
|
<string-array name="cpu_core_list">
|
||||||
<item>@string/Interpreter</item>
|
<item>@string/Interpreter</item>
|
||||||
<item>@string/Recompiler</item>
|
<item>@string/Recompiler</item>
|
||||||
|
@ -122,7 +142,7 @@
|
||||||
<item>3</item>
|
<item>3</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="trace_severity_list">
|
<string-array name="trace_severity_list">
|
||||||
<item>@string/TraceError</item>
|
<item>@string/TraceError</item>
|
||||||
<item>@string/TraceWarning</item>
|
<item>@string/TraceWarning</item>
|
||||||
<item>@string/TraceNotice</item>
|
<item>@string/TraceNotice</item>
|
||||||
|
@ -138,16 +158,15 @@
|
||||||
<item>5</item>
|
<item>5</item>
|
||||||
<item>6</item>
|
<item>6</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Path Preferences (selected path will become the summary) -->
|
|
||||||
<string name="pathGameSaves_title">Game save folder</string>
|
|
||||||
<string name="pathGameSaves_default">!project64</string>
|
|
||||||
|
|
||||||
<!-- Confirmation Dialogs -->
|
<!-- Confirmation Dialogs -->
|
||||||
<string name="confirmResetGame_title">Reset game?</string>
|
<string name="confirmResetGame_title">Reset game?</string>
|
||||||
<string name="confirmResetGame_message">The game will go back to a clear state, all progress made will be lost.</string>
|
<string name="confirmResetGame_message">The game will go back to a clear state, all progress made will be lost.</string>
|
||||||
|
<string name="GetSaveSupport_title">Save Support</string>
|
||||||
<!-- Asset Extractor -->
|
<string name="GetSaveSupport_message">Save support is a one time purchase and the only purchase in Project64.\n\nProject64 may not be perfect and making this as an upgrade it allows you to play and test the emulator before you have to spend any money.\n\nThis is also a good way for you to support and give back to the creation of the emulator..</string>
|
||||||
|
<string name="GetSaveSupport_OkButton">Purchase</string>
|
||||||
|
|
||||||
|
<!-- Asset Extractor -->
|
||||||
<string name="assetExtractor_startingUp">Starting Up …</string>
|
<string name="assetExtractor_startingUp">Starting Up …</string>
|
||||||
<string name="assetExtractor_version">version</string>
|
<string name="assetExtractor_version">version</string>
|
||||||
<string name="assetExtractor_progress">%1$.0f%% done: extracting - %2$s</string>
|
<string name="assetExtractor_progress">%1$.0f%% done: extracting - %2$s</string>
|
||||||
|
|
|
@ -6,18 +6,29 @@
|
||||||
android:key="audio_Enabled"
|
android:key="audio_Enabled"
|
||||||
android:summary="@string/audioEnabled_summary"
|
android:summary="@string/audioEnabled_summary"
|
||||||
android:title="@string/audioEnabled_title" />
|
android:title="@string/audioEnabled_title" />
|
||||||
<CheckBoxPreference
|
<PreferenceCategory android:title="@string/Advanced" >
|
||||||
android:key="UserInterface_BasicMode"
|
<CheckBoxPreference
|
||||||
android:summary="@string/advancedSettings_summary"
|
android:key="UserInterface_BasicMode"
|
||||||
android:title="@string/advancedSettings_title" />
|
android:summary="@string/advancedSettings_summary"
|
||||||
<CheckBoxPreference
|
android:title="@string/advancedSettings_title" />
|
||||||
android:key="Debugger_Enabled"
|
<CheckBoxPreference
|
||||||
android:summary="@string/debuggerEnabled_summary"
|
android:key="Debugger_Enabled"
|
||||||
android:title="@string/debuggerEnabled_title" />
|
android:summary="@string/debuggerEnabled_summary"
|
||||||
<CheckBoxPreference
|
android:title="@string/debuggerEnabled_title" />
|
||||||
android:key="Debugger_GenerateLogFiles"
|
<CheckBoxPreference
|
||||||
android:summary="@string/GenerateLogFiles_summary"
|
android:key="Debugger_GenerateLogFiles"
|
||||||
android:title="@string/GenerateLogFiles_title" />
|
android:summary="@string/GenerateLogFiles_summary"
|
||||||
|
android:title="@string/GenerateLogFiles_title" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="Debugger_DisplaySpeed"
|
||||||
|
android:summary="@string/DisplaySpeed_summary"
|
||||||
|
android:title="@string/DisplaySpeed_title" />
|
||||||
|
<ListPreference
|
||||||
|
android:entries="@array/DisplaySpeed_list"
|
||||||
|
android:entryValues="@array/DisplaySpeed_values"
|
||||||
|
android:key="Debugger_DisplaySpeedType"
|
||||||
|
android:title="@string/DisplaySpeedDisplay" />
|
||||||
|
</PreferenceCategory>
|
||||||
<PreferenceCategory android:title="@string/logging" >
|
<PreferenceCategory android:title="@string/logging" >
|
||||||
<Preference
|
<Preference
|
||||||
android:title="@string/project64core"
|
android:title="@string/project64core"
|
||||||
|
|
|
@ -14,6 +14,7 @@ import emu.project64.AndroidDevice;
|
||||||
import emu.project64.R;
|
import emu.project64.R;
|
||||||
import emu.project64.jni.NativeExports;
|
import emu.project64.jni.NativeExports;
|
||||||
import emu.project64.jni.SettingsID;
|
import emu.project64.jni.SettingsID;
|
||||||
|
import emu.project64.jni.SystemEvent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
@ -29,6 +30,10 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
||||||
{
|
{
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
if (NativeExports.SettingsLoadBool(SettingsID.GameRunning_CPU_Running.getValue()) == true)
|
||||||
|
{
|
||||||
|
NativeExports.ExternalEvent( SystemEvent.SysEvent_ResumeCPU_FromMenu.getValue());
|
||||||
|
}
|
||||||
setContentView(R.layout.settings_activity);
|
setContentView(R.layout.settings_activity);
|
||||||
|
|
||||||
// Add the tool bar to the activity (which supports the fancy menu/arrow animation)
|
// Add the tool bar to the activity (which supports the fancy menu/arrow animation)
|
||||||
|
@ -45,10 +50,12 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
||||||
|
|
||||||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
sharedPrefs.edit().clear()
|
sharedPrefs.edit().clear()
|
||||||
.putBoolean("audio_Enabled",true)
|
.putBoolean("audio_Enabled",NativeExports.SettingsLoadBool(SettingsID.Plugin_EnableAudio.getValue()))
|
||||||
.putBoolean("UserInterface_BasicMode",NativeExports.SettingsLoadBool(SettingsID.UserInterface_BasicMode.getValue()))
|
.putBoolean("UserInterface_BasicMode",NativeExports.SettingsLoadBool(SettingsID.UserInterface_BasicMode.getValue()))
|
||||||
.putBoolean("Debugger_Enabled",NativeExports.SettingsLoadBool(SettingsID.Debugger_Enabled.getValue()))
|
.putBoolean("Debugger_Enabled",NativeExports.SettingsLoadBool(SettingsID.Debugger_Enabled.getValue()))
|
||||||
.putBoolean("Debugger_GenerateLogFiles",NativeExports.SettingsLoadBool(SettingsID.Debugger_GenerateLogFiles.getValue()))
|
.putBoolean("Debugger_GenerateLogFiles",NativeExports.SettingsLoadBool(SettingsID.Debugger_GenerateLogFiles.getValue()))
|
||||||
|
.putBoolean("Debugger_DisplaySpeed",NativeExports.SettingsLoadBool(SettingsID.UserInterface_DisplayFrameRate.getValue()))
|
||||||
|
.putString("Debugger_DisplaySpeedType",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.UserInterface_FrameDisplayType.getValue())))
|
||||||
.putString("Debugger_TraceMD5",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceMD5.getValue())))
|
.putString("Debugger_TraceMD5",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceMD5.getValue())))
|
||||||
.putString("Debugger_TraceThread",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceThread.getValue())))
|
.putString("Debugger_TraceThread",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceThread.getValue())))
|
||||||
.putString("Debugger_TracePath",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TracePath.getValue())))
|
.putString("Debugger_TracePath",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TracePath.getValue())))
|
||||||
|
@ -110,8 +117,11 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
||||||
NativeExports.SettingsSaveBool(SettingsID.UserInterface_BasicMode.getValue(), sharedPreferences.getBoolean(key,false));
|
NativeExports.SettingsSaveBool(SettingsID.UserInterface_BasicMode.getValue(), sharedPreferences.getBoolean(key,false));
|
||||||
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_placeholder, new SettingsFragment()).commit();
|
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_placeholder, new SettingsFragment()).commit();
|
||||||
}
|
}
|
||||||
else if (key.equals("Debugger_Enabled")) { NativeExports.SettingsSaveBool(SettingsID.Debugger_Enabled.getValue(), sharedPreferences.getBoolean(key,false)); }
|
else if (key.equals("audio_Enabled")) { NativeExports.SettingsSaveBool(SettingsID.Plugin_EnableAudio.getValue(), sharedPreferences.getBoolean(key,false)); }
|
||||||
|
else if (key.equals("Debugger_Enabled")) { NativeExports.SettingsSaveBool(SettingsID.Debugger_Enabled.getValue(), sharedPreferences.getBoolean(key,false)); }
|
||||||
else if (key.equals("Debugger_GenerateLogFiles")) { NativeExports.SettingsSaveBool(SettingsID.Debugger_GenerateLogFiles.getValue(), sharedPreferences.getBoolean(key,false)); }
|
else if (key.equals("Debugger_GenerateLogFiles")) { NativeExports.SettingsSaveBool(SettingsID.Debugger_GenerateLogFiles.getValue(), sharedPreferences.getBoolean(key,false)); }
|
||||||
|
else if (key.equals("Debugger_DisplaySpeed")) { NativeExports.SettingsSaveBool(SettingsID.UserInterface_DisplayFrameRate.getValue(), sharedPreferences.getBoolean(key,false)); }
|
||||||
|
else if (key.equals("Debugger_DisplaySpeedType")) { NativeExports.SettingsSaveDword(SettingsID.UserInterface_FrameDisplayType.getValue(), Integer.valueOf(sharedPreferences.getString(key, "0"))); }
|
||||||
else if (key.equals("Debugger_TraceMD5")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceMD5.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
|
else if (key.equals("Debugger_TraceMD5")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceMD5.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
|
||||||
else if (key.equals("Debugger_TraceThread")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceThread.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
|
else if (key.equals("Debugger_TraceThread")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceThread.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
|
||||||
else if (key.equals("Debugger_TracePath")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TracePath.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
|
else if (key.equals("Debugger_TracePath")) { NativeExports.SettingsSaveDword(SettingsID.Debugger_TracePath.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1"))); }
|
||||||
|
|
Loading…
Reference in New Issue