summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2020-06-10 18:49:22 +0200
committerJosJuice <josjuice@gmail.com>2020-08-02 22:46:53 +0200
commit5cad82137d496328ce8e3ea6e5edf9dac524a11a (patch)
treecec56d8bd6dec4840811fff543c311feccf0fbf6 /Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
parenta41166bb376820389d9863ce23cf6fab20cb3b5f (diff)
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.
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp')
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
index 82d2f0b141..dd3be6cc65 100644
--- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
+++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
@@ -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));
}