mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Minor fixes to adhoc player listing (correct empty groupnames, comma-separate players)
This commit is contained in:
1 parent
9dbfa83596
commit
d87d942ef8
1 file changed
+9
-3
@@ -328,7 +328,7 @@ void CreateAdhocServerGameList(UI::ViewGroup *content, const std::vector<AdhocGa
|
||||
CollapsibleSection *gameSection = content->Add(new CollapsibleSection(title));
|
||||
gameSection->Header()->SetUnderline(false);
|
||||
for (const AdhocGroup &group : game.groups) {
|
||||
std::string groupName = group.name;
|
||||
std::string groupName(StripSpaces(group.name));
|
||||
if (groupName.empty()) {
|
||||
groupName = "???";
|
||||
}
|
||||
@@ -357,9 +357,15 @@ void CreateAdhocServerGameList(UI::ViewGroup *content, const std::vector<AdhocGa
|
||||
}
|
||||
} else {
|
||||
// Show each group on a single line.
|
||||
std::string groupString = " " + group.name + ApplySafeSubstitutions("(%1):", group.usercount);
|
||||
std::string groupString = " " + groupName + ApplySafeSubstitutions(" (%1):", group.usercount);
|
||||
bool first = true;
|
||||
for (const AdhocUser &user : group.users) {
|
||||
groupString.push_back(' ');
|
||||
if (first) {
|
||||
groupString += " ";
|
||||
first = false;
|
||||
} else {
|
||||
groupString += ", ";
|
||||
}
|
||||
groupString += user.name;
|
||||
}
|
||||
gameSection->Add(new TextView(groupString))->SetTextSize(TextSize::Small)->SetWordWrap();
|
||||
|
||||
Reference in new issue
Block a user