mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Merge branch 'master' into android-new-control-input-overlay
Conflicts: Source/Android/src/org/dolphinemu/dolphinemu/settings/video/VideoSettingsFragment.java
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
<!-- Game List Activity - Device Compatibility AlertDialog -->
|
||||
<string name="device_compat_warning">デバイスの互換性の警告</string>
|
||||
<string name="device_compat_warning_msg">この電話は、NEON拡張をサポートしていません。 おそらくDolphinを実行することはできません。\nあなたはとにかくそれを実行してみますか?</string>
|
||||
<string name="device_gles3compat_warning_msg">デバイスはOpenGLES3のビデオドライバのバグがあります。\nあなたはとにかくそれを使用してみたいのですか?</string>
|
||||
|
||||
<!-- Game List Fragment -->
|
||||
<string name="file_clicked">クリックされたファイル: %1$s</string>
|
||||
|
@ -29,6 +29,7 @@
|
||||
<!-- Game List Activity - Device Compatibility AlertDialog -->
|
||||
<string name="device_compat_warning">Device Compatibility Warning</string>
|
||||
<string name="device_compat_warning_msg">Your phone doesn\'t support NEON which makes it incapable of running Dolphin Mobile?\nDo you want to try anyway?</string>
|
||||
<string name="device_gles3compat_warning_msg">Your device has known buggy video drivers for OpenGL ES 3.\nDo you want to try anyway?</string>
|
||||
|
||||
<!-- Game List Fragment -->
|
||||
<string name="file_clicked">File clicked: %1$s</string>
|
||||
|
@ -28,6 +28,8 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
||||
public static String m_GLRenderer;
|
||||
public static String m_GLExtensions;
|
||||
public static float m_QualcommVersion;
|
||||
public static boolean m_Inited = false;
|
||||
private Activity m_activity;
|
||||
|
||||
/**
|
||||
* Class which provides a means to retrieve various
|
||||
@ -145,20 +147,24 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
||||
*/
|
||||
public static boolean SupportsGLES3()
|
||||
{
|
||||
VersionCheck mbuffer = new VersionCheck();
|
||||
m_GLVersion = mbuffer.getVersion();
|
||||
m_GLVendor = mbuffer.getVendor();
|
||||
m_GLRenderer = mbuffer.getRenderer();
|
||||
m_GLExtensions = mbuffer.getExtensions();
|
||||
|
||||
boolean mSupportsGLES3 = false;
|
||||
if (!m_Inited)
|
||||
{
|
||||
VersionCheck mbuffer = new VersionCheck();
|
||||
m_GLVersion = mbuffer.getVersion();
|
||||
m_GLVendor = mbuffer.getVendor();
|
||||
m_GLRenderer = mbuffer.getRenderer();
|
||||
m_GLExtensions = mbuffer.getExtensions();
|
||||
m_Inited = true;
|
||||
}
|
||||
|
||||
|
||||
// Check for OpenGL ES 3 support (General case).
|
||||
if (m_GLVersion != null && m_GLVersion.contains("OpenGL ES 3.0"))
|
||||
mSupportsGLES3 = true;
|
||||
|
||||
// Checking for OpenGL ES 3 support for certain Qualcomm devices.
|
||||
if (!mSupportsGLES3 && m_GLVendor != null && m_GLVendor.equals("Qualcomm"))
|
||||
if (m_GLVendor != null && m_GLVendor.equals("Qualcomm"))
|
||||
{
|
||||
if (m_GLRenderer.contains("Adreno (TM) 3"))
|
||||
{
|
||||
@ -180,6 +186,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
||||
mSupportsGLES3 = true;
|
||||
}
|
||||
}
|
||||
|
||||
return mSupportsGLES3;
|
||||
}
|
||||
|
||||
@ -248,9 +255,36 @@ public final class VideoSettingsFragment extends PreferenceFragment
|
||||
}
|
||||
else if (preference.getString(key, "Software Renderer").equals("OGL"))
|
||||
{
|
||||
mainScreen.getPreference(0).setEnabled(true);
|
||||
mainScreen.getPreference(1).setEnabled(true);
|
||||
mainScreen.getPreference(3).setEnabled(true);
|
||||
// Create an alert telling them that their phone sucks
|
||||
if (VideoSettingsFragment.SupportsGLES3()
|
||||
&& VideoSettingsFragment.m_GLVendor != null
|
||||
&& VideoSettingsFragment.m_GLVendor.equals("Qualcomm")
|
||||
&& VideoSettingsFragment.m_QualcommVersion == 14.0f)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(m_activity);
|
||||
builder.setTitle(R.string.device_compat_warning);
|
||||
builder.setMessage(R.string.device_gles3compat_warning_msg);
|
||||
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
mainScreen.getPreference(0).setEnabled(true);
|
||||
mainScreen.getPreference(1).setEnabled(true);
|
||||
mainScreen.getPreference(3).setEnabled(true);
|
||||
//mainScreen.getPreference(4).setEnabled(false);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which)
|
||||
{
|
||||
// Get an editor.
|
||||
SharedPreferences.Editor editor = sPrefs.edit();
|
||||
editor.putString("gpuPref", "Software Renderer");
|
||||
editor.commit();
|
||||
videoBackends.setValue("Software Renderer");
|
||||
videoBackends.setSummary("Software Renderer");
|
||||
}
|
||||
});
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user