Skip to content

Commit

Permalink
Use title database for game display names in the list view
Browse files Browse the repository at this point in the history
  • Loading branch information
SirMangler committed Sep 9, 2023
1 parent 839395d commit e29ee41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Core/UICommon/ImGuiMenu/ImGuiFrontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ std::shared_ptr<UICommon::GameFile> ImGuiFrontend::CreateGameList()
m_list_search_results.clear();
for (auto& game : m_games)
{
auto& name = game->GetLongName();
auto& name = game->GetName(m_title_database);
auto it = std::search(name.begin(), name.end(), search_phrase.begin(),
search_phrase.end(), [](unsigned char ch1, unsigned char ch2) {
return std::toupper(ch1) == std::toupper(ch2);
Expand All @@ -1601,7 +1601,8 @@ std::shared_ptr<UICommon::GameFile> ImGuiFrontend::CreateGameList()

for (auto& game : games)
{
if (ImGui::Selectable(std::format("{}##{}", game->GetLongName(), game->GetFilePath()).c_str()))
if (ImGui::Selectable(std::format("{}##{}", game->GetName(m_title_database).c_str(),
game->GetFilePath()).c_str()))
{
ImGui::EndListBox();
return game;
Expand Down

0 comments on commit e29ee41

Please sign in to comment.