2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #6556 from Morph1984/default-mii

service: mii: Retrieve the correct default miis.
This commit is contained in:
bunnei 2021-07-05 13:51:00 -07:00 committed by GitHub
commit 3d03a6ae02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,7 @@ namespace {
constexpr ResultCode ERROR_CANNOT_FIND_ENTRY{ErrorModule::Mii, 4}; constexpr ResultCode ERROR_CANNOT_FIND_ENTRY{ErrorModule::Mii, 4};
constexpr std::size_t BaseMiiCount{2};
constexpr std::size_t DefaultMiiCount{RawData::DefaultMii.size()}; constexpr std::size_t DefaultMiiCount{RawData::DefaultMii.size()};
constexpr MiiStoreData::Name DefaultMiiName{u'y', u'u', u'z', u'u'}; constexpr MiiStoreData::Name DefaultMiiName{u'y', u'u', u'z', u'u'};
@ -415,7 +416,7 @@ u32 MiiManager::GetCount(SourceFlag source_flag) const {
count += 0; count += 0;
} }
if ((source_flag & SourceFlag::Default) != SourceFlag::None) { if ((source_flag & SourceFlag::Default) != SourceFlag::None) {
count += DefaultMiiCount; count += (DefaultMiiCount - BaseMiiCount);
} }
return static_cast<u32>(count); return static_cast<u32>(count);
} }
@ -445,7 +446,7 @@ ResultVal<std::vector<MiiInfoElement>> MiiManager::GetDefault(SourceFlag source_
return MakeResult(std::move(result)); return MakeResult(std::move(result));
} }
for (std::size_t index = 0; index < DefaultMiiCount; index++) { for (std::size_t index = BaseMiiCount; index < DefaultMiiCount; index++) {
result.emplace_back(BuildDefault(index), Source::Default); result.emplace_back(BuildDefault(index), Source::Default);
} }