Added a fallback title based on codeset info

This commit is contained in:
zhupengfei
2020-05-15 22:34:39 +08:00
parent 1415235a13
commit 450cef3fca
3 changed files with 41 additions and 4 deletions
+15
View File
@@ -374,6 +374,21 @@ bool NCCHContainer<File>::HasExHeader() {
return has_exheader;
}
template <typename File>
ResultStatus NCCHContainer<File>::ReadCodesetName(std::string& name) {
ResultStatus result = Load();
if (result != ResultStatus::Success)
return result;
if (!has_exheader)
return ResultStatus::ErrorNotUsed;
std::array<char, 9> name_data{};
std::memcpy(name_data.data(), exheader_header.codeset_info.name, 8);
name = name_data.data();
return ResultStatus::Success;
}
template <typename File>
ResultStatus NCCHContainer<File>::ReadEncryptionType(EncryptionType& encryption) {
ResultStatus result = Load();