mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-24 04:41:21 -08:00
service: nfc: Fully Implement GetRegisterInfoPrivate
This commit is contained in:
parent
1e8616bd01
commit
2f22b53732
@ -439,6 +439,7 @@ Result NfcDevice::Mount(NFP::ModelType model_type, NFP::MountTarget mount_target
|
|||||||
|
|
||||||
device_state = DeviceState::TagMounted;
|
device_state = DeviceState::TagMounted;
|
||||||
mount_target = mount_target_;
|
mount_target = mount_target_;
|
||||||
|
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -716,12 +717,13 @@ Result NfcDevice::GetRegisterInfoPrivate(NFP::RegisterInfoPrivate& register_info
|
|||||||
return ResultRegistrationIsNotInitialized;
|
return ResultRegistrationIsNotInitialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
Service::Mii::MiiManager manager;
|
Mii::StoreData store_data{};
|
||||||
const auto& settings = tag_data.settings;
|
const auto& settings = tag_data.settings;
|
||||||
|
tag_data.owner_mii.BuildToStoreData(store_data);
|
||||||
|
|
||||||
// TODO: Validate and complete this data
|
// TODO: Validate and complete this data
|
||||||
register_info = {
|
register_info = {
|
||||||
.mii_store_data = {},
|
.mii_store_data = store_data,
|
||||||
.creation_date = settings.init_date.GetWriteDate(),
|
.creation_date = settings.init_date.GetWriteDate(),
|
||||||
.amiibo_name = GetAmiiboName(settings),
|
.amiibo_name = GetAmiiboName(settings),
|
||||||
.font_region = settings.settings.font_region,
|
.font_region = settings.settings.font_region,
|
||||||
@ -1372,7 +1374,7 @@ NFP::AmiiboName NfcDevice::GetAmiiboName(const NFP::AmiiboSettings& settings) co
|
|||||||
|
|
||||||
// Convert from utf16 to utf8
|
// Convert from utf16 to utf8
|
||||||
const auto amiibo_name_utf8 = Common::UTF16ToUTF8(settings_amiibo_name.data());
|
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;
|
return amiibo_name;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user