Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2413 from sigmabeta/android-lollipop-settings
Android: Implement Settings screen in new UI.
- Loading branch information
Showing
22 changed files
with
1,164 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- All lists for ListPreference keys/values are placed here --> | ||
<resources> | ||
|
||
<!-- New UI CPU Core selection - ARM32 --> | ||
<string-array name="string_emu_cores" translatable="false"> | ||
<item>@string/interpreter</item> | ||
<item>@string/jit_arm_recompiler</item> | ||
</string-array> | ||
<string-array name="int_emu_cores" translatable="false"> | ||
<item>0</item> | ||
<item>3</item> | ||
</string-array> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- Title of the app --> | ||
<string name="title_new_ui">Dolphin ARM32</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- All lists for ListPreference keys/values are placed here --> | ||
<resources> | ||
|
||
<!-- New UI CPU Core selection - ARM64 --> | ||
<string-array name="string_emu_cores" translatable="false"> | ||
<item>@string/interpreter</item> | ||
<item>@string/jit_arm64_recompiler</item> | ||
</string-array> | ||
<string-array name="int_emu_cores" translatable="false"> | ||
<item>0</item> | ||
<item>4</item> | ||
</string-array> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- Title of the app --> | ||
<string name="title_new_ui">Dolphin ARM64</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/SettingsActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.dolphinemu.dolphinemu.activities; | ||
|
||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
import org.dolphinemu.dolphinemu.fragments.SettingsFragment; | ||
import org.dolphinemu.dolphinemu.services.SettingsSaveService; | ||
|
||
public final class SettingsActivity extends Activity | ||
{ | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) | ||
{ | ||
super.onCreate(savedInstanceState); | ||
|
||
// Display the fragment as the main content. | ||
getFragmentManager().beginTransaction() | ||
.replace(android.R.id.content, new SettingsFragment(), "settings_fragment") | ||
.commit(); | ||
} | ||
|
||
/** | ||
* If this is called, the user has left the settings screen (potentially through the | ||
* home button) and will expect their changes to be persisted. So we kick off an | ||
* IntentService which will do so on a background thread. | ||
*/ | ||
@Override | ||
protected void onStop() | ||
{ | ||
super.onStop(); | ||
|
||
Log.d("DolphinEmulator", "Settings activity stopping. Saving settings to INI..."); | ||
|
||
// Copy assets into appropriate locations. | ||
Intent settingsSaver = new Intent(this, SettingsSaveService.class); | ||
startService(settingsSaver); | ||
} | ||
} |
Oops, something went wrong.