mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 22:10:01 +00:00
Merge pull request #6035 from thedax/egl-extensions-tab
SystemInfoScreen: Don't show the EGL Extensions tab if there are none to show.
This commit is contained in:
commit
9dfe12dc2a
@ -259,18 +259,24 @@ void SystemInfoScreen::CreateViews() {
|
||||
oglExtensions->Add(new TextView(exts[i]));
|
||||
}
|
||||
|
||||
ViewGroup *eglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
LinearLayout *eglExtensions = new LinearLayout(ORIENT_VERTICAL);
|
||||
eglExtensions->SetSpacing(0);
|
||||
eglExtensionsScroll->Add(eglExtensions);
|
||||
tabHolder->AddTab("EGL Extensions", eglExtensionsScroll);
|
||||
|
||||
eglExtensions->Add(new ItemHeader("EGL Extensions"));
|
||||
exts.clear();
|
||||
SplitString(g_all_egl_extensions, ' ', exts);
|
||||
std::sort(exts.begin(), exts.end());
|
||||
for (size_t i = 0; i < exts.size(); i++) {
|
||||
eglExtensions->Add(new TextView(exts[i]));
|
||||
|
||||
// If there aren't any EGL extensions, no need to show the tab.
|
||||
if (exts.size() > 0) {
|
||||
ViewGroup *eglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
LinearLayout *eglExtensions = new LinearLayout(ORIENT_VERTICAL);
|
||||
eglExtensions->SetSpacing(0);
|
||||
eglExtensionsScroll->Add(eglExtensions);
|
||||
|
||||
tabHolder->AddTab("EGL Extensions", eglExtensionsScroll);
|
||||
|
||||
eglExtensions->Add(new ItemHeader("EGL Extensions"));
|
||||
|
||||
for (size_t i = 0; i < exts.size(); i++) {
|
||||
eglExtensions->Add(new TextView(exts[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user