mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-18 11:42:36 +00:00
Fix regression for .elf files in Netplay Game Selector
Rearranged code to look nicer, as well
This commit is contained in:
parent
1cfeacd5b6
commit
453d7777e5
@ -80,6 +80,8 @@ static std::string BuildGameName(const GameListItem& game)
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string name(game.GetName(lang));
|
std::string name(game.GetName(lang));
|
||||||
|
if (name.empty())
|
||||||
|
name = game.GetName();
|
||||||
|
|
||||||
int disc_number = game.GetDiscNumber() + 1;
|
int disc_number = game.GetDiscNumber() + 1;
|
||||||
|
|
||||||
@ -92,17 +94,13 @@ static std::string BuildGameName(const GameListItem& game)
|
|||||||
std::string disc_text = "Disc ";
|
std::string disc_text = "Disc ";
|
||||||
info.push_back(disc_text + std::to_string(disc_number));
|
info.push_back(disc_text + std::to_string(disc_number));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.empty())
|
if (info.empty())
|
||||||
return name;
|
return name;
|
||||||
else
|
|
||||||
{
|
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
std::copy(info.begin(), info.end() -1, std::ostream_iterator<std::string>(ss, ", "));
|
std::copy(info.begin(), info.end() -1, std::ostream_iterator<std::string>(ss, ", "));
|
||||||
ss << info.back();
|
ss << info.back();
|
||||||
return name + " (" + ss.str() + ")";
|
return name + " (" + ss.str() + ")";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void NetPlayDialog::FillWithGameNames(wxListBox* game_lbox, const CGameListCtrl& game_list)
|
void NetPlayDialog::FillWithGameNames(wxListBox* game_lbox, const CGameListCtrl& game_list)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user