mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge branch 'master' of https://code.google.com/p/dolphin-emu into android-core-control
This commit is contained in:
@ -82,6 +82,8 @@
|
||||
<string name="opengl_es3">OpenGL ES 3</string>
|
||||
<string name="video_backend">ビデオレンダラ</string>
|
||||
<string name="video_backend_to_use">使用するビデオレンダラー</string>
|
||||
<string name="show_fps">FPSを表示</string>
|
||||
<string name="show_fps_descrip">エミュレーション速度の指標として、画面左上に毎秒レンダリングされた フレーム数を表示します。</string>
|
||||
<string name="draw_onscreen_controls">画面上のコントロールを描画</string>
|
||||
|
||||
<string name="enhancements">画質向上の設定</string>
|
||||
|
@ -82,6 +82,8 @@
|
||||
<string name="opengl_es3">OpenGL ES 3</string>
|
||||
<string name="video_backend">Video Backend</string>
|
||||
<string name="video_backend_to_use">Video backend to use</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>
|
||||
|
||||
<string name="enhancements">Enhancements</string>
|
||||
|
@ -3,66 +3,66 @@
|
||||
|
||||
<!-- Video Settings -->
|
||||
|
||||
|
||||
|
||||
<!-- Video Enhancements -->
|
||||
<PreferenceScreen android:title="@string/enhancements">
|
||||
|
||||
|
||||
<ListPreference
|
||||
android:entries="@array/internalResolutionEntries"
|
||||
android:entryValues="@array/internalResolutionValues"
|
||||
android:key="internalResolution"
|
||||
android:summary="@string/internal_resolution_descrip"
|
||||
android:title="@string/internal_resolution"/>
|
||||
|
||||
|
||||
<ListPreference
|
||||
android:entries="@array/anisotropicFilteringEntries"
|
||||
android:entryValues="@array/anisotropicFilteringValues"
|
||||
android:key="anisotropicFiltering"
|
||||
android:summary="@string/anisotropic_filtering_descrip"
|
||||
android:title="@string/anisotropic_filtering"/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="scaledEFBCopy"
|
||||
android:summary="@string/scaled_efb_copy_descrip"
|
||||
android:title="@string/scaled_efb_copy"/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="perPixelLighting"
|
||||
android:summary="@string/per_pixel_lighting_descrip"
|
||||
android:title="@string/per_pixel_lighting"/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="forceTextureFiltering"
|
||||
android:summary="@string/force_texture_filtering_descrip"
|
||||
android:title="@string/force_texture_filtering"/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="disableFog"
|
||||
android:summary="@string/disable_fog_descrip"
|
||||
android:title="@string/disable_fog"/>
|
||||
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
|
||||
<!-- Video Hacks -->
|
||||
<PreferenceScreen android:title="@string/hacks">
|
||||
<PreferenceCategory android:title="@string/embedded_frame_buffer">
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="skipEFBAccess"
|
||||
android:summary="@string/skip_efb_access_descrip"
|
||||
android:title="@string/skip_efb_access"/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="ignoreFormatChanges"
|
||||
android:summary="@string/ignore_format_changes_descrip"
|
||||
android:title="@string/ignore_format_changes"/>
|
||||
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="Texture"
|
||||
android:entries="@array/efbCopyMethodEntries"
|
||||
@ -70,9 +70,9 @@
|
||||
android:key="efbCopyMethod"
|
||||
android:summary="@string/efb_copy_method_descrip"
|
||||
android:title="@string/efb_copy_method"/>
|
||||
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
<!-- Texture Cache -->
|
||||
<PreferenceCategory android:title="@string/texture_cache">
|
||||
<ListPreference
|
||||
@ -83,7 +83,7 @@
|
||||
android:summary="@string/texture_cache_accuracy_descrip"
|
||||
android:title="@string/texture_cache_accuracy"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
<!-- External Frame Buffer -->
|
||||
<PreferenceCategory android:title="@string/external_frame_buffer">
|
||||
<ListPreference
|
||||
@ -94,36 +94,41 @@
|
||||
android:summary="@string/external_frame_buffer_descrip"
|
||||
android:title="@string/external_frame_buffer"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Other Hacks -->
|
||||
<PreferenceCategory android:title="@string/other">
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="cacheDisplayLists"
|
||||
android:summary="@string/cache_display_lists_descrip"
|
||||
android:title="@string/cache_display_lists"/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="disableDestinationAlpha"
|
||||
android:summary="@string/disable_destination_alpha_descrip"
|
||||
android:title="@string/disable_destination_alpha"/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="fastDepthCalculation"
|
||||
android:summary="@string/fast_depth_calculation_descrip"
|
||||
android:title="@string/fast_depth_calculation"/>
|
||||
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
|
||||
<ListPreference
|
||||
android:key="gpuPref"
|
||||
android:summary="@string/video_backend_to_use"
|
||||
android:title="@string/video_backend" />
|
||||
android:key="gpuPref"
|
||||
android:summary="@string/video_backend_to_use"
|
||||
android:title="@string/video_backend" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="showFPS"
|
||||
android:summary="@string/show_fps_descrip"
|
||||
android:title="@string/show_fps"/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
|
@ -28,14 +28,12 @@ import org.dolphinemu.dolphinemu.settings.VideoSettingsFragment;
|
||||
public final class AboutFragment extends Fragment
|
||||
{
|
||||
private static Activity m_activity;
|
||||
private ListView mMainList;
|
||||
private AboutFragmentAdapter adapter;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||
{
|
||||
View rootView = inflater.inflate(R.layout.gamelist_listview, container, false);
|
||||
mMainList = (ListView) rootView.findViewById(R.id.gamelist);
|
||||
ListView mMainList = (ListView) rootView.findViewById(R.id.gamelist);
|
||||
|
||||
String yes = getString(R.string.yes);
|
||||
String no = getString(R.string.no);
|
||||
@ -44,7 +42,7 @@ public final class AboutFragment extends Fragment
|
||||
Input.add(new AboutFragmentItem(getString(R.string.build_revision), NativeLibrary.GetVersionString()));
|
||||
Input.add(new AboutFragmentItem(getString(R.string.supports_gles3), VideoSettingsFragment.SupportsGLES3() ? yes : no));
|
||||
|
||||
adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
|
||||
AboutFragmentAdapter adapter = new AboutFragmentAdapter(m_activity, R.layout.about_layout, Input);
|
||||
mMainList.setAdapter(adapter);
|
||||
|
||||
return mMainList;
|
||||
|
@ -18,10 +18,8 @@ import java.io.*;
|
||||
|
||||
/**
|
||||
* The main activity of this emulator.
|
||||
*
|
||||
* @param <MainActivity> Main activity.
|
||||
*/
|
||||
public final class DolphinEmulator<MainActivity> extends Activity
|
||||
public final class DolphinEmulator extends Activity
|
||||
{
|
||||
private void CopyAsset(String asset, String output)
|
||||
{
|
||||
|
@ -14,7 +14,6 @@ import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
|
@ -112,7 +112,7 @@ public final class FolderBrowser extends Fragment
|
||||
return mDrawerList;
|
||||
}
|
||||
|
||||
private AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
|
||||
private final AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
|
||||
{
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||
{
|
||||
@ -143,7 +143,6 @@ public final class FolderBrowser extends Fragment
|
||||
{
|
||||
String Directories = NativeLibrary.GetConfig("Dolphin.ini", "General", "GCMPathes", "0");
|
||||
int intDirectories = Integer.parseInt(Directories);
|
||||
Directories = Integer.toString(intDirectories + 1);
|
||||
|
||||
// Check to see if a path set in the Dolphin config
|
||||
// matches the one the user is trying to add. If it's
|
||||
|
@ -178,7 +178,7 @@ public final class GameListActivity extends Activity
|
||||
}
|
||||
}
|
||||
|
||||
private AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
|
||||
private final AdapterView.OnItemClickListener mMenuItemClickListener = new AdapterView.OnItemClickListener()
|
||||
{
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ public final class GameListFragment extends Fragment
|
||||
return mMainList;
|
||||
}
|
||||
|
||||
private AdapterView.OnItemClickListener mGameItemClickListener = new AdapterView.OnItemClickListener()
|
||||
private final AdapterView.OnItemClickListener mGameItemClickListener = new AdapterView.OnItemClickListener()
|
||||
{
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
|
||||
{
|
||||
|
@ -30,11 +30,10 @@ import org.dolphinemu.dolphinemu.R;
|
||||
* within the input control mapping config.
|
||||
*/
|
||||
public final class InputConfigFragment extends PreferenceFragment
|
||||
//implements PrefsActivity.OnGameConfigListener
|
||||
{
|
||||
private Activity m_activity;
|
||||
private boolean firstEvent = true;
|
||||
private static ArrayList<Float> m_values = new ArrayList<Float>();
|
||||
private static final ArrayList<Float> m_values = new ArrayList<Float>();
|
||||
|
||||
/**
|
||||
* Gets the descriptor for the given {@link InputDevice}.
|
||||
|
@ -37,7 +37,8 @@ public final class UserPreferences
|
||||
editor.putString("cpuCorePref", getConfig("Dolphin.ini", "Core", "CPUCore", "3"));
|
||||
editor.putBoolean("dualCorePref", getConfig("Dolphin.ini", "Core", "CPUThread", "False").equals("True"));
|
||||
|
||||
editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend ", "Software Renderer"));
|
||||
editor.putString("gpuPref", getConfig("Dolphin.ini", "Core", "GFXBackend ", "Software Renderer"));
|
||||
editor.putBoolean("showFPS", getConfig("gfx_opengl.ini", "Settings", "ShowFPS", "False").equals("True"));
|
||||
editor.putBoolean("drawOnscreenControls", getConfig("Dolphin.ini", "Android", "ScreenControls", "True").equals("True"));
|
||||
|
||||
editor.putString("internalResolution", getConfig("gfx_opengl.ini", "Settings", "EFBScale", "2") );
|
||||
@ -120,6 +121,9 @@ public final class UserPreferences
|
||||
// Current video backend being used. Falls back to software rendering upon error.
|
||||
String currentVideoBackend = prefs.getString("gpuPref", "Software Rendering");
|
||||
|
||||
// Whether or not FPS will be displayed on-screen.
|
||||
boolean showingFPS = prefs.getBoolean("showFPS", false);
|
||||
|
||||
// Whether or not to draw on-screen controls.
|
||||
boolean drawingOnscreenControls = prefs.getBoolean("drawOnscreenControls", true);
|
||||
|
||||
@ -172,6 +176,7 @@ public final class UserPreferences
|
||||
|
||||
// General Video Settings
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Core", "GFXBackend", currentVideoBackend);
|
||||
NativeLibrary.SetConfig("gfx_opengl.ini", "Settings", "ShowFPS", showingFPS ? "True" : "False");
|
||||
NativeLibrary.SetConfig("Dolphin.ini", "Android", "ScreenControls", drawingOnscreenControls ? "True" : "False");
|
||||
|
||||
// Video Hack Settings
|
||||
|
@ -16,9 +16,13 @@ import javax.microedition.khronos.opengles.GL10;
|
||||
import org.dolphinemu.dolphinemu.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.preference.PreferenceScreen;
|
||||
|
||||
/**
|
||||
* Responsible for handling the loading of the video preferences.
|
||||
@ -195,6 +199,58 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
||||
videoBackends.setEntries(R.array.videoBackendEntriesNoGLES3);
|
||||
videoBackends.setEntryValues(R.array.videoBackendValuesNoGLES3);
|
||||
}
|
||||
|
||||
//
|
||||
// Disable all options if Software Rendering is used.
|
||||
//
|
||||
// Note that the numeric value in 'getPreference()'
|
||||
// denotes the placement on the UI. So if more elements are
|
||||
// added to the video settings, these may need to change.
|
||||
//
|
||||
final SharedPreferences sPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
final PreferenceScreen mainScreen = getPreferenceScreen();
|
||||
|
||||
if (videoBackends.getValue().equals("Software Renderer"))
|
||||
{
|
||||
mainScreen.getPreference(0).setEnabled(false);
|
||||
mainScreen.getPreference(1).setEnabled(false);
|
||||
mainScreen.getPreference(3).setEnabled(false);
|
||||
mainScreen.getPreference(4).setEnabled(false);
|
||||
}
|
||||
else if (videoBackends.getValue().equals("OGL"))
|
||||
{
|
||||
mainScreen.getPreference(0).setEnabled(true);
|
||||
mainScreen.getPreference(1).setEnabled(true);
|
||||
mainScreen.getPreference(3).setEnabled(true);
|
||||
mainScreen.getPreference(4).setEnabled(true);
|
||||
}
|
||||
|
||||
// Also set a listener, so that if someone changes the video backend, it will disable
|
||||
// the video settings, upon the user choosing "Software Rendering".
|
||||
sPrefs.registerOnSharedPreferenceChangeListener(new OnSharedPreferenceChangeListener()
|
||||
{
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences preference, String key)
|
||||
{
|
||||
if (key.equals("gpuPref"))
|
||||
{
|
||||
if (preference.getString(key, "Software Renderer").equals("Software Renderer"))
|
||||
{
|
||||
mainScreen.getPreference(0).setEnabled(false);
|
||||
mainScreen.getPreference(1).setEnabled(false);
|
||||
mainScreen.getPreference(3).setEnabled(false);
|
||||
mainScreen.getPreference(4).setEnabled(false);
|
||||
}
|
||||
else if (preference.getString(key, "Software Renderer").equals("OGL"))
|
||||
{
|
||||
mainScreen.getPreference(0).setEnabled(true);
|
||||
mainScreen.getPreference(1).setEnabled(true);
|
||||
mainScreen.getPreference(3).setEnabled(true);
|
||||
mainScreen.getPreference(4).setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user