[Project64] Add game list setting page
This commit is contained in:
parent
e5a99a9e12
commit
69404c94c9
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -107,6 +107,8 @@
|
|||
<string name="video_screen_title">Video</string>
|
||||
<string name="audio_screen_summary">Sound settings</string>
|
||||
<string name="audio_screen_title">Audio</string>
|
||||
<string name="game_list_summary">Game list settings</string>
|
||||
<string name="game_list_title">Game list</string>
|
||||
<string name="advanced_screen_summary">advanced/debugging settings</string>
|
||||
<string name="advanced_screen_title">Advanced</string>
|
||||
<string name="reset_summary">Restore default settings</string>
|
||||
|
@ -181,6 +183,7 @@
|
|||
<string name="gamepad_title">Gamepad settings</string>
|
||||
<string name="settings_reset_title">Reset settings</string>
|
||||
<string name="settings_reset_message">Reset all settings back to their defaults?</string>
|
||||
<string name="MaxRomsRemembered_title">Max # of games remembered</string>
|
||||
|
||||
<string-array name="DisplaySpeed_list">
|
||||
<item>@string/DListPerSecond</item>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:project64="http://schemas.android.com/apk/res/emu.project64"
|
||||
android:key="screenRoot" >
|
||||
|
||||
<emu.project64.settings.SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:key="MaxRomsRemembered"
|
||||
android:title="@string/MaxRomsRemembered_title"
|
||||
project64:maximumValue="20"
|
||||
project64:minimumValue="0"
|
||||
project64:stepSize="1"
|
||||
project64:units=""
|
||||
/>
|
||||
|
||||
</PreferenceScreen>
|
|
@ -21,6 +21,12 @@
|
|||
android:key="settings_audio"
|
||||
android:icon="@drawable/ic_speaker"
|
||||
/>
|
||||
<Preference
|
||||
android:summary="@string/game_list_summary"
|
||||
android:title="@string/game_list_title"
|
||||
android:key="settings_game_list"
|
||||
android:icon="@drawable/ic_storage"
|
||||
/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/Other" >
|
||||
<Preference
|
||||
|
|
|
@ -113,6 +113,10 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat
|
|||
{
|
||||
loadFragment(new VideoFragment());
|
||||
}
|
||||
else if (preference.getKey().equals("settings_game_list"))
|
||||
{
|
||||
loadFragment(new GameListFragment());
|
||||
}
|
||||
else if (preference.getKey().equals("settings_audio"))
|
||||
{
|
||||
loadFragment(new AudioFragment());
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/****************************************************************************
|
||||
* *
|
||||
* Project64 - A Nintendo 64 emulator. *
|
||||
* http://www.pj64-emu.com/ *
|
||||
* Copyright (C) 2012 Project64. All rights reserved. *
|
||||
* *
|
||||
* License: *
|
||||
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
||||
* *
|
||||
****************************************************************************/
|
||||
package emu.project64.settings;
|
||||
|
||||
import emu.project64.R;
|
||||
|
||||
public class GameListFragment extends BaseSettingsFragment
|
||||
{
|
||||
@Override
|
||||
protected int getXml()
|
||||
{
|
||||
return R.xml.setting_gamelist;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getTitleId()
|
||||
{
|
||||
return R.string.game_list_title;
|
||||
}
|
||||
}
|
|
@ -85,6 +85,7 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
|||
.putString("Debugger_TraceUserInterface",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceUserInterface.getValue())))
|
||||
.putString("Debugger_TraceRomList",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceRomList.getValue())))
|
||||
.putString("Debugger_TraceExceptionHandler",String.valueOf(NativeExports.SettingsLoadDword(SettingsID.Debugger_TraceExceptionHandler.getValue())))
|
||||
.putInt("MaxRomsRemembered",NativeExports.UISettingsLoadDword(UISettingID.File_RecentGameFileCount.getValue()))
|
||||
.apply();
|
||||
|
||||
sharedPrefs.registerOnSharedPreferenceChangeListener(this);
|
||||
|
@ -203,5 +204,6 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere
|
|||
{
|
||||
NativeExports.SettingsSaveDword(SettingsID.Debugger_TraceExceptionHandler.getValue(), Integer.valueOf(sharedPreferences.getString(key, "1")));
|
||||
}
|
||||
else if (key.equals("MaxRomsRemembered")) { NativeExports.UISettingsSaveDword(UISettingID.File_RecentGameFileCount.getValue(), sharedPreferences.getInt(key, 10)); }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue