summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2017-11-06 23:11:34 -0800
committerGitHub <noreply@github.com>2017-11-06 23:11:34 -0800
commit835eff15a18fab15ee8c08241dd9b1588dd428ca (patch)
tree265c7f03f3b285142567431f3e677713bcfd4824 /Source/Core/DolphinWX/FrameTools.cpp
parentd378811271a75d4b6454c157b1a2e6000ec425d1 (diff)
parent1dc2a85ccc2e3a23b9cd33d1503038223bfae320 (diff)
Merge pull request #6162 from JosJuice/nand-check-save-game-name
When NAND is damaged, show title names from save files
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index c714c7f12c..3c6e21386a 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -57,11 +57,13 @@
#include "Core/PowerPC/PPCSymbolDB.h"
#include "Core/PowerPC/PowerPC.h"
#include "Core/State.h"
+#include "Core/TitleDatabase.h"
#include "Core/WiiUtils.h"
#include "DiscIO/Enums.h"
#include "DiscIO/NANDImporter.h"
#include "DiscIO/VolumeWad.h"
+#include "DiscIO/WiiSaveBanner.h"
#include "DolphinWX/AboutDolphin.h"
#include "DolphinWX/Cheats/CheatsWindow.h"
@@ -1331,10 +1333,25 @@ void CFrame::OnCheckNAND(wxCommandEvent&)
Core::TitleDatabase title_db;
for (const u64 title_id : result.titles_to_remove)
{
- const std::string name = title_db.GetTitleName(title_id);
- title_listings += !name.empty() ?
- StringFromFormat("%s (%016" PRIx64 ")", name.c_str(), title_id) :
- StringFromFormat("%016" PRIx64, title_id);
+ title_listings += StringFromFormat("%016" PRIx64, title_id);
+
+ const std::string database_name = title_db.GetChannelName(title_id);
+ if (!database_name.empty())
+ {
+ title_listings += " - " + database_name;
+ }
+ else
+ {
+ DiscIO::WiiSaveBanner banner(title_id);
+ if (banner.IsValid())
+ {
+ title_listings += " - " + banner.GetName();
+ const std::string description = banner.GetDescription();
+ if (!StripSpaces(description).empty())
+ title_listings += " - " + description;
+ }
+ }
+
title_listings += "\n";
}
@@ -1344,7 +1361,7 @@ void CFrame::OnCheckNAND(wxCommandEvent&)
"By continuing, the following title(s) will be removed:\n\n"
"%s"
"\nLaunching these titles may also fix the issues."),
- title_listings.c_str());
+ StrToWxStr(title_listings));
}
if (wxMessageBox(message, _("NAND Check"), wxYES_NO) != wxYES)