summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Morph2021-07-04 05:38:34 -0400
committerGravatar Morph2021-07-04 05:38:34 -0400
commit5dfa313d2c5cf8310598f427ba782a8d2eb5760e (patch)
tree561bf3c62e528a7422da601820101ac82f396999 /src
parentMerge pull request #6498 from Kelebek1/Audio (diff)
downloadyuzu-5dfa313d2c5cf8310598f427ba782a8d2eb5760e.tar.gz
yuzu-5dfa313d2c5cf8310598f427ba782a8d2eb5760e.tar.xz
yuzu-5dfa313d2c5cf8310598f427ba782a8d2eb5760e.zip
service: mii: Retrieve the correct default miis.
We were including the first 2 default miis which are not meant to be shown in games. With this change, we properly retrieve the 6 default miis shown in games, with 3 of each gender.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/mii/manager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/mii/manager.cpp b/src/core/hle/service/mii/manager.cpp
index 114aff31c..869d2763f 100644
--- a/src/core/hle/service/mii/manager.cpp
+++ b/src/core/hle/service/mii/manager.cpp
@@ -20,6 +20,7 @@ namespace {
20 20
21constexpr ResultCode ERROR_CANNOT_FIND_ENTRY{ErrorModule::Mii, 4}; 21constexpr ResultCode ERROR_CANNOT_FIND_ENTRY{ErrorModule::Mii, 4};
22 22
23constexpr std::size_t BaseMiiCount{2};
23constexpr std::size_t DefaultMiiCount{RawData::DefaultMii.size()}; 24constexpr std::size_t DefaultMiiCount{RawData::DefaultMii.size()};
24 25
25constexpr MiiStoreData::Name DefaultMiiName{u'y', u'u', u'z', u'u'}; 26constexpr MiiStoreData::Name DefaultMiiName{u'y', u'u', u'z', u'u'};
@@ -415,7 +416,7 @@ u32 MiiManager::GetCount(SourceFlag source_flag) const {
415 count += 0; 416 count += 0;
416 } 417 }
417 if ((source_flag & SourceFlag::Default) != SourceFlag::None) { 418 if ((source_flag & SourceFlag::Default) != SourceFlag::None) {
418 count += DefaultMiiCount; 419 count += (DefaultMiiCount - BaseMiiCount);
419 } 420 }
420 return static_cast<u32>(count); 421 return static_cast<u32>(count);
421} 422}
@@ -445,7 +446,7 @@ ResultVal<std::vector<MiiInfoElement>> MiiManager::GetDefault(SourceFlag source_
445 return MakeResult(std::move(result)); 446 return MakeResult(std::move(result));
446 } 447 }
447 448
448 for (std::size_t index = 0; index < DefaultMiiCount; index++) { 449 for (std::size_t index = BaseMiiCount; index < DefaultMiiCount; index++) {
449 result.emplace_back(BuildDefault(index), Source::Default); 450 result.emplace_back(BuildDefault(index), Source::Default);
450 } 451 }
451 452