diff options
author | german77 <juangerman-13@hotmail.com> | 2023-09-11 08:23:46 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-09-11 08:23:46 +0200 |
commit | 571399930cc3578acff064a7087fe85e7b2dd9b7 (patch) | |
tree | aa02d3b9932d758d1febb3e7bbd6cf50a9ee6f31 /src/core/hle/service/nfc/common/device.cpp | |
parent | service: mii: move char info operations (diff) | |
download | yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.gz yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.bz2 yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.lz yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.xz yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.tar.zst yuzu-571399930cc3578acff064a7087fe85e7b2dd9b7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nfc/common/device.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 5e61d2595..eb7706015 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -824,8 +824,11 @@ Result NfcDevice::SetRegisterInfoPrivate(const NFP::RegisterInfoPrivate& registe return ResultWrongDeviceState; } - Service::Mii::MiiManager manager; - const auto mii = manager.BuildBase(Mii::Gender::Male); + Service::Mii::StoreData store_data{}; + Service::Mii::NfpStoreDataExtension extension{}; + store_data.BuildBase(Mii::Gender::Male); + extension.SetFromStoreData(store_data); + auto& settings = tag_data.settings; if (tag_data.settings.settings.amiibo_initialized == 0) { @@ -834,8 +837,8 @@ Result NfcDevice::SetRegisterInfoPrivate(const NFP::RegisterInfoPrivate& registe } SetAmiiboName(settings, register_info.amiibo_name); - tag_data.owner_mii.BuildFromStoreData(mii); - tag_data.mii_extension = manager.SetFromStoreData(mii); + tag_data.owner_mii.BuildFromStoreData(store_data); + tag_data.mii_extension = extension; tag_data.unknown = 0; tag_data.unknown2 = {}; settings.country_code_id = 0; @@ -1452,7 +1455,7 @@ void NfcDevice::UpdateRegisterInfoCrc() { void NfcDevice::BuildAmiiboWithoutKeys(NFP::NTAG215File& stubbed_tag_data, const NFP::EncryptedNTAG215File& encrypted_file) const { - Service::Mii::MiiManager manager; + Service::Mii::StoreData store_data{}; auto& settings = stubbed_tag_data.settings; stubbed_tag_data = NFP::AmiiboCrypto::NfcDataToEncodedData(encrypted_file); @@ -1466,7 +1469,8 @@ void NfcDevice::BuildAmiiboWithoutKeys(NFP::NTAG215File& stubbed_tag_data, SetAmiiboName(settings, {'y', 'u', 'z', 'u', 'A', 'm', 'i', 'i', 'b', 'o'}); settings.settings.font_region.Assign(0); settings.init_date = GetAmiiboDate(GetCurrentPosixTime()); - stubbed_tag_data.owner_mii.BuildFromStoreData(manager.BuildBase(Mii::Gender::Male)); + store_data.BuildBase(Mii::Gender::Male); + stubbed_tag_data.owner_mii.BuildFromStoreData(store_data); // Admin info settings.settings.amiibo_initialized.Assign(1); |