diff options
author | german77 <juangerman-13@hotmail.com> | 2023-09-17 18:43:39 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-09-18 00:06:25 +0200 |
commit | 2f22b53732a91750e61697a02de3d99cc30c17a4 (patch) | |
tree | 2f0e6a6935d2f4547aab7443debbf7d66a2f3b70 /src/core/hle/service/nfc/common/device.cpp | |
parent | service: mii: Complete structs and fix mistakes (diff) | |
download | yuzu-2f22b53732a91750e61697a02de3d99cc30c17a4.tar yuzu-2f22b53732a91750e61697a02de3d99cc30c17a4.tar.gz yuzu-2f22b53732a91750e61697a02de3d99cc30c17a4.tar.bz2 yuzu-2f22b53732a91750e61697a02de3d99cc30c17a4.tar.lz yuzu-2f22b53732a91750e61697a02de3d99cc30c17a4.tar.xz yuzu-2f22b53732a91750e61697a02de3d99cc30c17a4.tar.zst yuzu-2f22b53732a91750e61697a02de3d99cc30c17a4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nfc/common/device.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 674d2e4b2..05951d8cb 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -439,6 +439,7 @@ Result NfcDevice::Mount(NFP::ModelType model_type, NFP::MountTarget mount_target device_state = DeviceState::TagMounted; mount_target = mount_target_; + return ResultSuccess; } @@ -716,12 +717,13 @@ Result NfcDevice::GetRegisterInfoPrivate(NFP::RegisterInfoPrivate& register_info return ResultRegistrationIsNotInitialized; } - Service::Mii::MiiManager manager; + Mii::StoreData store_data{}; const auto& settings = tag_data.settings; + tag_data.owner_mii.BuildToStoreData(store_data); // TODO: Validate and complete this data register_info = { - .mii_store_data = {}, + .mii_store_data = store_data, .creation_date = settings.init_date.GetWriteDate(), .amiibo_name = GetAmiiboName(settings), .font_region = settings.settings.font_region, @@ -1372,7 +1374,7 @@ NFP::AmiiboName NfcDevice::GetAmiiboName(const NFP::AmiiboSettings& settings) co // Convert from utf16 to utf8 const auto amiibo_name_utf8 = Common::UTF16ToUTF8(settings_amiibo_name.data()); - memcpy(amiibo_name.data(), amiibo_name_utf8.data(), amiibo_name_utf8.size()); + memcpy(amiibo_name.data(), amiibo_name_utf8.data(), amiibo_name_utf8.size() - 1); return amiibo_name; } |