summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeWad.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/DiscIO/VolumeWad.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/DiscIO/VolumeWad.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeWad.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp
index 4b45f0b706..2d98986f81 100644
--- a/Source/Core/DiscIO/VolumeWad.cpp
+++ b/Source/Core/DiscIO/VolumeWad.cpp
@@ -22,6 +22,7 @@
#include "DiscIO/Enums.h"
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeWad.h"
+#include "DiscIO/WiiSaveBanner.h"
namespace DiscIO
{
@@ -137,10 +138,10 @@ std::map<Language, std::string> VolumeWAD::GetLongNames() const
if (!m_tmd.IsValid() || !IOS::ES::IsChannel(m_tmd.GetTitleId()))
return {};
- std::vector<u8> name_data(NAMES_TOTAL_BYTES);
- if (!Read(m_opening_bnr_offset + 0x9C, NAMES_TOTAL_BYTES, name_data.data()))
+ std::vector<char16_t> names(NAMES_TOTAL_CHARS);
+ if (!Read(m_opening_bnr_offset + 0x9C, NAMES_TOTAL_BYTES, reinterpret_cast<u8*>(names.data())))
return std::map<Language, std::string>();
- return ReadWiiNames(name_data);
+ return ReadWiiNames(names);
}
std::vector<u32> VolumeWAD::GetBanner(int* width, int* height) const
@@ -152,7 +153,7 @@ std::vector<u32> VolumeWAD::GetBanner(int* width, int* height) const
if (!title_id)
return std::vector<u32>();
- return GetWiiBanner(width, height, *title_id);
+ return WiiSaveBanner(*title_id).GetBanner(width, height);
}
BlobType VolumeWAD::GetBlobType() const