Add a CPU Extensions tab to Developer's System Info.

This commit is contained in:
Sacha 2013-11-15 01:17:22 +10:00
parent a74718c54f
commit e6320f2726
2 changed files with 18 additions and 4 deletions

View File

@ -289,13 +289,13 @@ std::string CPUInfo::Summarize()
if (bHalf) sum += ", Half";
if (bThumb) sum += ", Thumb";
if (bFastMult) sum += ", FastMult";
if (bVFP) sum += ", VFP";
if (bEDSP) sum += ", EDSP";
if (bThumbEE) sum += ", ThumbEE";
if (bNEON) sum += ", NEON";
if (bVFPv3) sum += ", VFPv3";
if (bTLS) sum += ", TLS";
if (bVFP) sum += ", VFP";
if (bVFPv3) sum += ", VFPv3";
if (bVFPv4) sum += ", VFPv4";
if (bNEON) sum += ", NEON";
if (bIDIVa) sum += ", IDIVa";
if (bIDIVt) sum += ", IDIVt";

View File

@ -201,6 +201,20 @@ void SystemInfoScreen::CreateViews() {
openGL.resize(30);
deviceSpecs->Add(new InfoItem("OpenGL", openGL));
deviceSpecs->Add(new InfoItem("GLSL", (char *)glGetString(GL_SHADING_LANGUAGE_VERSION)));
ViewGroup *cpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
LinearLayout *cpuExtensions = new LinearLayout(ORIENT_VERTICAL);
cpuExtensions->SetSpacing(0);
cpuExtensionsScroll->Add(cpuExtensions);
tabHolder->AddTab("CPU Extensions", cpuExtensionsScroll);
cpuExtensions->Add(new ItemHeader("CPU Extensions"));
std::vector<std::string> exts;
SplitString(cpu_info.Summarize(), ',', exts);
for (size_t i = 2; i < exts.size(); i++) {
cpuExtensions->Add(new TextView(exts[i]));
}
ViewGroup *oglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
LinearLayout *oglExtensions = new LinearLayout(ORIENT_VERTICAL);
@ -218,7 +232,7 @@ void SystemInfoScreen::CreateViews() {
oglExtensions->Add(new ItemHeader("OpenGL ES 2.0 Extensions"));
#endif
std::vector<std::string> exts;
exts.clear();
SplitString(g_all_gl_extensions, ' ', exts);
std::sort(exts.begin(), exts.end());
for (size_t i = 0; i < exts.size(); i++) {