diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-09-07 20:20:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 20:20:24 +0200 |
commit | bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07 (patch) | |
tree | 7f8e2d5bb8e7d7c15c42a21fb59abf332fb35986 /src/core/hle/service/mii/mii_manager.cpp | |
parent | Merge pull request #11428 from Kelebek1/adsp_rework (diff) | |
parent | service: mii: Fix broken mii on MK8 (diff) | |
download | yuzu-bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07.tar yuzu-bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07.tar.gz yuzu-bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07.tar.bz2 yuzu-bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07.tar.lz yuzu-bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07.tar.xz yuzu-bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07.tar.zst yuzu-bbfd9eb428c7b1c811a3a041d62a7d4c94cafa07.zip |
Diffstat (limited to 'src/core/hle/service/mii/mii_manager.cpp')
-rw-r--r-- | src/core/hle/service/mii/mii_manager.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index 6b966f20d..dd632df50 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp @@ -18,7 +18,6 @@ namespace { constexpr Result ERROR_CANNOT_FIND_ENTRY{ErrorModule::Mii, 4}; -constexpr std::size_t BaseMiiCount{2}; constexpr std::size_t DefaultMiiCount{RawData::DefaultMii.size()}; constexpr MiiStoreData::Name DefaultMiiName{u'n', u'o', u' ', u'n', u'a', u'm', u'e'}; @@ -404,7 +403,7 @@ u32 MiiManager::GetCount(SourceFlag source_flag) const { count += 0; } if ((source_flag & SourceFlag::Default) != SourceFlag::None) { - count += (DefaultMiiCount - BaseMiiCount); + count += DefaultMiiCount; } return static_cast<u32>(count); } @@ -422,13 +421,18 @@ CharInfo MiiManager::BuildRandom(Age age, Gender gender, Race race) { return ConvertStoreDataToInfo(BuildRandomStoreData(age, gender, race, user_id)); } +CharInfo MiiManager::BuildBase(Gender gender) { + const std::size_t index = gender == Gender::Female ? 1 : 0; + return ConvertStoreDataToInfo(BuildDefaultStoreData(RawData::BaseMii.at(index), user_id)); +} + CharInfo MiiManager::BuildDefault(std::size_t index) { return ConvertStoreDataToInfo(BuildDefaultStoreData(RawData::DefaultMii.at(index), user_id)); } CharInfo MiiManager::ConvertV3ToCharInfo(const Ver3StoreData& mii_v3) const { Service::Mii::MiiManager manager; - auto mii = manager.BuildDefault(0); + auto mii = manager.BuildBase(Mii::Gender::Male); if (!ValidateV3Info(mii_v3)) { return mii; @@ -678,7 +682,7 @@ std::vector<MiiInfoElement> MiiManager::GetDefault(SourceFlag source_flag) { return result; } - for (std::size_t index = BaseMiiCount; index < DefaultMiiCount; index++) { + for (std::size_t index = 0; index < DefaultMiiCount; index++) { result.emplace_back(BuildDefault(index), Source::Default); } |