Skip to content

Commit

Permalink
[Android] Disable the workaround for Qualcomm devices with driver >= …
Browse files Browse the repository at this point in the history
…53 for the rotated framebuffer since it is fixed now.
  • Loading branch information
Sonicadvance1 committed Nov 15, 2013
1 parent b9d7bb9 commit 0720026
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Expand Up @@ -68,12 +68,14 @@ public void onCreate(Bundle savedInstanceState)

// Due to a bug in Adreno, it renders the screen rotated 90 degrees when using OpenGL
// Flip the width and height when on Adreno to work around this.
// This bug is fixed in Qualcomm driver v53
// Mali isn't affected by this bug.
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (prefs.getString("gpuPref", "Software Rendering").equals("OGL")
&& VideoSettingsFragment.SupportsGLES3()
&& VideoSettingsFragment.m_GLVendor != null
&& VideoSettingsFragment.m_GLVendor.equals("Qualcomm"))
&& VideoSettingsFragment.m_GLVendor.equals("Qualcomm")
&& VideoSettingsFragment.m_QualcommVersion < 53.0f)
NativeLibrary.SetDimensions((int)screenHeight, (int)screenWidth);
else
NativeLibrary.SetDimensions((int)screenWidth, (int)screenHeight);
Expand Down
Expand Up @@ -28,6 +28,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
public static String m_GLVendor;
public static String m_GLRenderer;
public static String m_GLExtensions;
public static float m_QualcommVersion;
private Activity m_activity;

/**
Expand Down Expand Up @@ -165,7 +166,6 @@ public static boolean SupportsGLES3()
{
int mVStart = m_GLVersion.indexOf("V@") + 2;
int mVEnd = 0;
float mVersion;

for (int a = mVStart; a < m_GLVersion.length(); ++a)
{
Expand All @@ -176,9 +176,9 @@ public static boolean SupportsGLES3()
}
}

mVersion = Float.parseFloat(m_GLVersion.substring(mVStart, mVEnd));
m_QualcommVersion = Float.parseFloat(m_GLVersion.substring(mVStart, mVEnd));

if (mVersion >= 14.0f)
if (m_QualcommVersion >= 14.0f)
mSupportsGLES3 = true;
}
}
Expand Down

0 comments on commit 0720026

Please sign in to comment.