From afc1398fbd46a3b9d04eb0aab186b3d944c8becb Mon Sep 17 00:00:00 2001 From: Stevoisiak Date: Sun, 22 Mar 2015 19:48:52 -0400 Subject: [PATCH] Fix reading custom titles from WAD files --- Source/Core/DolphinWX/GameListCtrl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/GameListCtrl.cpp b/Source/Core/DolphinWX/GameListCtrl.cpp index f997b2a9e7..7e2f769e90 100644 --- a/Source/Core/DolphinWX/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/GameListCtrl.cpp @@ -408,9 +408,15 @@ void CGameListCtrl::InsertItemInReportView(long _Index) break; const size_t equals_index = line.find('='); - if (line.substr(0, equals_index - 1) == rISOFile.GetUniqueID()) + std::string game_id = rISOFile.GetUniqueID(); + + // Ignore publisher ID for WAD files + if (rISOFile.GetPlatform() == DiscIO::IVolume::WII_WAD) + game_id.erase(game_id.size() - 2); + + if (line.substr(0, equals_index - 1) == game_id) { - name = StrToWxStr(line.substr(equals_index + 2)); + name = StrToWxStr(StripSpaces(line.substr(equals_index + 1))); break; } }