mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-22 02:09:06 +00:00
Allow translations and custom names in GameFile::GetNetPlayName
There is no longer any major reason for why this function would need to return the same result for all players.
This commit is contained in:
parent
a41166bb37
commit
5cad82137d
10 changed files with 25 additions and 13 deletions
|
@ -55,7 +55,8 @@ void GameListDialog::PopulateGameList()
|
|||
{
|
||||
std::shared_ptr<const UICommon::GameFile> game = game_list_model->GetGameFile(i);
|
||||
|
||||
auto* item = new QListWidgetItem(QString::fromStdString(game->GetNetPlayName()));
|
||||
auto* item =
|
||||
new QListWidgetItem(QString::fromStdString(game_list_model->GetNetPlayName(*game)));
|
||||
item->setData(Qt::UserRole, QVariant::fromValue(std::move(game)));
|
||||
m_game_list->addItem(item);
|
||||
}
|
||||
|
|
|
@ -325,9 +325,12 @@ void NetPlayDialog::ConnectWidgets()
|
|||
GameListDialog gld(this);
|
||||
if (gld.exec() == QDialog::Accepted)
|
||||
{
|
||||
Settings& settings = Settings::Instance();
|
||||
|
||||
const UICommon::GameFile& game = gld.GetSelectedGame();
|
||||
const std::string netplay_name = game.GetNetPlayName();
|
||||
Settings::Instance().GetNetPlayServer()->ChangeGame(game.GetSyncIdentifier(), netplay_name);
|
||||
const std::string netplay_name = settings.GetGameListModel()->GetNetPlayName(game);
|
||||
|
||||
settings.GetNetPlayServer()->ChangeGame(game.GetSyncIdentifier(), netplay_name);
|
||||
Settings::GetQSettings().setValue(QStringLiteral("netplay/hostgame"),
|
||||
QString::fromStdString(netplay_name));
|
||||
}
|
||||
|
|
|
@ -363,7 +363,8 @@ void NetPlaySetupDialog::PopulateGameList()
|
|||
{
|
||||
std::shared_ptr<const UICommon::GameFile> game = m_game_list_model->GetGameFile(i);
|
||||
|
||||
auto* item = new QListWidgetItem(QString::fromStdString(game->GetNetPlayName()));
|
||||
auto* item =
|
||||
new QListWidgetItem(QString::fromStdString(m_game_list_model->GetNetPlayName(*game)));
|
||||
item->setData(Qt::UserRole, QVariant::fromValue(std::move(game)));
|
||||
m_host_games->addItem(item);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue