diff options
author | german77 <juangerman-13@hotmail.com> | 2023-09-11 16:53:23 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-09-11 17:54:32 +0200 |
commit | ec25f847d8c066241d3aa9bb00bd11cb0c47b161 (patch) | |
tree | 0fb517718e80499316fcd1994e93355391844af3 /src/core/hle/service/mii/types/ver3_store_data.cpp | |
parent | mii: Prepare Interface for new implementation (diff) | |
download | yuzu-ec25f847d8c066241d3aa9bb00bd11cb0c47b161.tar yuzu-ec25f847d8c066241d3aa9bb00bd11cb0c47b161.tar.gz yuzu-ec25f847d8c066241d3aa9bb00bd11cb0c47b161.tar.bz2 yuzu-ec25f847d8c066241d3aa9bb00bd11cb0c47b161.tar.lz yuzu-ec25f847d8c066241d3aa9bb00bd11cb0c47b161.tar.xz yuzu-ec25f847d8c066241d3aa9bb00bd11cb0c47b161.tar.zst yuzu-ec25f847d8c066241d3aa9bb00bd11cb0c47b161.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/mii/types/ver3_store_data.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/core/hle/service/mii/types/ver3_store_data.cpp b/src/core/hle/service/mii/types/ver3_store_data.cpp index 53a3fe44b..c7624520c 100644 --- a/src/core/hle/service/mii/types/ver3_store_data.cpp +++ b/src/core/hle/service/mii/types/ver3_store_data.cpp @@ -33,16 +33,7 @@ void Ver3StoreData::BuildToStoreData(StoreData& out_store_data) const { out_store_data.SetHeight(height); out_store_data.SetBuild(build); - // Copy name until string terminator - Nickname name = {}; - for (std::size_t index = 0; index < name.data.size() - 1; index++) { - name.data[index] = mii_name[index]; - if (name.data[index] == 0) { - break; - } - } - - out_store_data.SetNickname(name); + out_store_data.SetNickname(mii_name); out_store_data.SetFontRegion( static_cast<FontRegion>(static_cast<u8>(region_information.font_region))); @@ -108,15 +99,7 @@ void Ver3StoreData::BuildFromStoreData(const StoreData& store_data) { height = store_data.GetHeight(); build = store_data.GetBuild(); - // Copy name until string terminator - mii_name = {}; - for (std::size_t index = 0; index < store_data.GetNickname().data.size() - 1; index++) { - mii_name[index] = store_data.GetNickname().data[index]; - if (mii_name[index] == 0) { - break; - } - } - + mii_name = store_data.GetNickname(); region_information.font_region.Assign(static_cast<u8>(store_data.GetFontRegion())); appearance_bits1.faceline_type.Assign(store_data.GetFacelineType()); @@ -183,7 +166,7 @@ void Ver3StoreData::BuildFromStoreData(const StoreData& store_data) { u32 Ver3StoreData::IsValid() const { bool is_valid = version == 0 || version == 3; - is_valid = is_valid && (mii_name[0] != 0); + is_valid = is_valid && (mii_name.data[0] != 0); is_valid = is_valid && (mii_information.birth_month < 13); is_valid = is_valid && (mii_information.birth_day < 32); |