[Android] Actually show the currently selected CPU core and video backend within the settings screen.

This commit is contained in:
Lioncash 2013-10-10 11:57:18 -04:00
parent 8b6ff7a358
commit 511de71736
5 changed files with 58 additions and 20 deletions

View File

@ -64,23 +64,26 @@
<string name="trigger_left">左のトリガー</string>
<string name="trigger_right">右のトリガー</string>
<!-- Prefs Fragment -->
<!-- CPU Preference Fragment -->
<string name="interpreter">Interpreter</string>
<string name="jit64_recompiler">JIT64 Recompiler</string>
<string name="jitil_recompiler">JITIL Recompiler</string>
<string name="jit_arm_recompiler">JIT ARM Recompiler</string>
<string name="cpu_core">CPUコア</string>
<string name="jitil_arm_recompiler">JITIL ARM Recompiler</string>
<string name="cpu_settings">CPU</string>
<string name="emu_core_to_use">使用するエミュレーションコア</string>
<string name="cpu_core">CPUコア</string>
<string name="cpu_core_desc">%s</string>
<string name="dual_core">デュアルコア</string>
<string name="dual_core_descrip">処理のための2つのCPUコアを使用して。速度が向上します。</string>
<string name="fastmem">Fastmem</string>
<string name="fastmem_desc">メモリアクセスのために潜在的に危険な最適化を使用して。</string>
<!-- Video Preference Fragment -->
<string name="video_settings">ビデオ</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES</string>
<string name="video_backend">ビデオレンダラ</string>
<string name="video_backend_to_use">使用するビデオレンダラー</string>
<string name="video_backend_desc">%s</string>
<string name="show_fps">FPSを表示</string>
<string name="show_fps_descrip">エミュレーション速度の指標として、画面左上に毎秒レンダリングされた フレーム数を表示します。</string>
<string name="draw_onscreen_controls">画面上のコントロールを描画</string>

View File

@ -64,24 +64,26 @@
<string name="trigger_left">Trigger L</string>
<string name="trigger_right">Trigger R</string>
<!-- Preference Related -->
<!-- CPU Preference Fragment -->
<string name="interpreter">Interpreter</string>
<string name="jit64_recompiler">JIT64 Recompiler</string>
<string name="jitil_recompiler">JITIL Recompiler</string>
<string name="jit_arm_recompiler">JIT ARM Recompiler</string>
<string name="jitil_arm_recompiler">JITIL ARM Recompiler</string>
<string name="cpu_core">CPU Core</string>
<string name="cpu_settings">CPU</string>
<string name="emu_core_to_use">Emulation core to use</string>
<string name="cpu_core">CPU Core</string>
<string name="cpu_core_desc">%s</string>
<string name="dual_core">Dual Core</string>
<string name="dual_core_descrip">Split workload to two CPU cores instead of one. Increases speed.</string>
<string name="fastmem">Fastmem</string>
<string name="fastmem_desc">Uses potentially unsafe optimizations for memory access.</string>
<!-- Video Preference Fragment -->
<string name="video_settings">Video</string>
<string name="software_renderer">Software Renderer</string>
<string name="opengl_es3">OpenGL ES</string>
<string name="video_backend">Video Backend</string>
<string name="video_backend_to_use">Video backend to use</string>
<string name="video_backend_desc">%s</string>
<string name="show_fps">Show FPS</string>
<string name="show_fps_descrip">Show the number of frames rendered per second as a measure of emulation speed.</string>
<string name="draw_onscreen_controls">Draw on-screen controls</string>

View File

@ -7,9 +7,9 @@
android:summary="@string/dual_core_descrip"
android:title="@string/dual_core" />
<ListPreference
<org.dolphinemu.dolphinemu.settings.custom.UpdatingListPreference
android:key="cpuCorePref"
android:summary="@string/emu_core_to_use"
android:summary="@string/cpu_core_desc"
android:title="@string/cpu_core" />
<CheckBoxPreference

View File

@ -127,9 +127,9 @@
</PreferenceCategory>
</PreferenceScreen>
<ListPreference
<org.dolphinemu.dolphinemu.settings.custom.UpdatingListPreference
android:key="gpuPref"
android:summary="@string/video_backend_to_use"
android:summary="@string/video_backend_desc"
android:title="@string/video_backend" />
<CheckBoxPreference

View File

@ -0,0 +1,33 @@
package org.dolphinemu.dolphinemu.settings.custom;
import android.content.Context;
import android.preference.ListPreference;
import android.util.AttributeSet;
/**
* A {@link ListPreference} that updates its summary upon it's selection being changed.
*/
public final class UpdatingListPreference extends ListPreference
{
/**
* Constructor
*
* @param context the current {@link Context}.
*/
public UpdatingListPreference(Context context, AttributeSet attribs)
{
super(context, attribs);
}
@Override
public void onDialogClosed(boolean positiveResult)
{
super.onDialogClosed(positiveResult);
// If an entry was selected
if (positiveResult)
{
setSummary(getEntry());
}
}
}