summaryrefslogtreecommitdiff
path: root/src/core/hle/service/mii
diff options
context:
space:
mode:
authorGravatar Narr the Reg2023-03-14 22:00:38 -0600
committerGravatar Narr the Reg2023-03-14 23:42:41 -0600
commit026fe2e4f4128f4c81a07e25cb646620f7643a75 (patch)
treef370c2ce9b622ce4571c37d5d0e16f6bd07a0984 /src/core/hle/service/mii
parentMerge pull request #9933 from vonchenplus/texture_format (diff)
downloadyuzu-026fe2e4f4128f4c81a07e25cb646620f7643a75.tar.gz
yuzu-026fe2e4f4128f4c81a07e25cb646620f7643a75.tar.xz
yuzu-026fe2e4f4128f4c81a07e25cb646620f7643a75.zip
service: nfp: Actually write correct crc
Diffstat (limited to 'src/core/hle/service/mii')
-rw-r--r--src/core/hle/service/mii/mii_manager.cpp2
-rw-r--r--src/core/hle/service/mii/types.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp
index 3a2fe938f..9d31a080c 100644
--- a/src/core/hle/service/mii/mii_manager.cpp
+++ b/src/core/hle/service/mii/mii_manager.cpp
@@ -585,6 +585,8 @@ Ver3StoreData MiiManager::ConvertCharInfoToV3(const CharInfo& mii) const {
585 mii_v3.appearance_bits11.mole_x_position.Assign(mii.mole_x); 585 mii_v3.appearance_bits11.mole_x_position.Assign(mii.mole_x);
586 mii_v3.appearance_bits11.mole_y_position.Assign(mii.mole_y); 586 mii_v3.appearance_bits11.mole_y_position.Assign(mii.mole_y);
587 587
588 mii_v3.crc = GenerateCrc16(&mii_v3, sizeof(Ver3StoreData) - sizeof(u16));
589
588 // TODO: Validate mii_v3 data 590 // TODO: Validate mii_v3 data
589 591
590 return mii_v3; 592 return mii_v3;
diff --git a/src/core/hle/service/mii/types.h b/src/core/hle/service/mii/types.h
index 9e3247397..1f53e6af3 100644
--- a/src/core/hle/service/mii/types.h
+++ b/src/core/hle/service/mii/types.h
@@ -365,7 +365,8 @@ struct Ver3StoreData {
365 } appearance_bits11; 365 } appearance_bits11;
366 366
367 std::array<u16_le, 0xA> author_name; 367 std::array<u16_le, 0xA> author_name;
368 INSERT_PADDING_BYTES(0x4); 368 INSERT_PADDING_BYTES(0x2);
369 u16_be crc;
369}; 370};
370static_assert(sizeof(Ver3StoreData) == 0x60, "Ver3StoreData is an invalid size"); 371static_assert(sizeof(Ver3StoreData) == 0x60, "Ver3StoreData is an invalid size");
371 372