mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06: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:
@ -743,6 +743,11 @@ GameList::FindSecondDisc(const UICommon::GameFile& game) const
|
||||
return m_model->FindSecondDisc(game);
|
||||
}
|
||||
|
||||
std::string GameList::GetNetPlayName(const UICommon::GameFile& game) const
|
||||
{
|
||||
return m_model->GetNetPlayName(game);
|
||||
}
|
||||
|
||||
void GameList::SetViewColumn(int col, bool view)
|
||||
{
|
||||
m_list->setColumnHidden(col, !view);
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
bool HasMultipleSelected() const;
|
||||
std::shared_ptr<const UICommon::GameFile> FindGame(const std::string& path) const;
|
||||
std::shared_ptr<const UICommon::GameFile> FindSecondDisc(const UICommon::GameFile& game) const;
|
||||
std::string GetNetPlayName(const UICommon::GameFile& game) const;
|
||||
|
||||
void SetListView() { SetPreferredView(true); }
|
||||
void SetGridView() { SetPreferredView(false); }
|
||||
|
@ -313,6 +313,11 @@ std::shared_ptr<const UICommon::GameFile> GameListModel::GetGameFile(int index)
|
||||
return m_games[index];
|
||||
}
|
||||
|
||||
std::string GameListModel::GetNetPlayName(const UICommon::GameFile& game) const
|
||||
{
|
||||
return game.GetNetPlayName(m_title_database);
|
||||
}
|
||||
|
||||
void GameListModel::AddGame(const std::shared_ptr<const UICommon::GameFile>& game)
|
||||
{
|
||||
beginInsertRows(QModelIndex(), m_games.size(), m_games.size());
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
int columnCount(const QModelIndex& parent) const override;
|
||||
|
||||
std::shared_ptr<const UICommon::GameFile> GetGameFile(int index) const;
|
||||
std::string GetNetPlayName(const UICommon::GameFile& game) const;
|
||||
bool ShouldDisplayGameListItem(int index) const;
|
||||
void SetSearchTerm(const QString& term);
|
||||
|
||||
|
Reference in New Issue
Block a user