summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Sebastian Valle2016-05-05 12:56:36 -0700
committerGravatar Sebastian Valle2016-05-05 12:56:36 -0700
commit24d064e8300d19272a2b527687ab889f351d8bf5 (patch)
tree8b45b53fdc97f9093606f906bd7783ceffcfbf21 /src
parentMerge pull request #1757 from JayFoxRox/rename-vertexloaded-bp (diff)
parentLayout Mii parameters input/output, and return success as result of applet work (diff)
downloadyuzu-24d064e8300d19272a2b527687ab889f351d8bf5.tar.gz
yuzu-24d064e8300d19272a2b527687ab889f351d8bf5.tar.xz
yuzu-24d064e8300d19272a2b527687ab889f351d8bf5.zip
Merge pull request #1706 from mailwl/mii-selector
Layout Mii parameters input/output, and return success as result of applet work
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/applets/mii_selector.cpp5
-rw-r--r--src/core/hle/applets/mii_selector.h44
2 files changed, 49 insertions, 0 deletions
diff --git a/src/core/hle/applets/mii_selector.cpp b/src/core/hle/applets/mii_selector.cpp
index 708d2f630..5191c821d 100644
--- a/src/core/hle/applets/mii_selector.cpp
+++ b/src/core/hle/applets/mii_selector.cpp
@@ -55,6 +55,11 @@ ResultCode MiiSelector::StartImpl(const Service::APT::AppletStartupParameter& pa
55 // TODO(Subv): Set the expected fields in the response buffer before resending it to the application. 55 // TODO(Subv): Set the expected fields in the response buffer before resending it to the application.
56 // TODO(Subv): Reverse the parameter format for the Mii Selector 56 // TODO(Subv): Reverse the parameter format for the Mii Selector
57 57
58 if(parameter.buffer_size >= sizeof(u32)) {
59 // TODO: defaults return no error, but garbage in other unknown fields
60 memset(parameter.data, 0, sizeof(u32));
61 }
62
58 // Let the application know that we're closing 63 // Let the application know that we're closing
59 Service::APT::MessageParameter message; 64 Service::APT::MessageParameter message;
60 message.buffer_size = parameter.buffer_size; 65 message.buffer_size = parameter.buffer_size;
diff --git a/src/core/hle/applets/mii_selector.h b/src/core/hle/applets/mii_selector.h
index 6a3e7c8eb..c02dded4a 100644
--- a/src/core/hle/applets/mii_selector.h
+++ b/src/core/hle/applets/mii_selector.h
@@ -16,6 +16,50 @@
16namespace HLE { 16namespace HLE {
17namespace Applets { 17namespace Applets {
18 18
19struct MiiConfig {
20 u8 unk_000;
21 u8 unk_001;
22 u8 unk_002;
23 u8 unk_003;
24 u8 unk_004;
25 INSERT_PADDING_BYTES(3);
26 u16 unk_008;
27 INSERT_PADDING_BYTES(0x8C - 0xA);
28 u8 unk_08C;
29 INSERT_PADDING_BYTES(3);
30 u16 unk_090;
31 INSERT_PADDING_BYTES(2);
32 u32 unk_094;
33 u16 unk_098;
34 u8 unk_09A[0x64];
35 u8 unk_0FE;
36 u8 unk_0FF;
37 u32 unk_100;
38};
39
40static_assert(sizeof(MiiConfig) == 0x104, "MiiConfig structure has incorrect size");
41#define ASSERT_REG_POSITION(field_name, position) static_assert(offsetof(MiiConfig, field_name) == position, "Field "#field_name" has invalid position")
42ASSERT_REG_POSITION(unk_008, 0x08);
43ASSERT_REG_POSITION(unk_08C, 0x8C);
44ASSERT_REG_POSITION(unk_090, 0x90);
45ASSERT_REG_POSITION(unk_094, 0x94);
46ASSERT_REG_POSITION(unk_0FE, 0xFE);
47#undef ASSERT_REG_POSITION
48
49struct MiiResult {
50 u32 result_code;
51 u8 unk_04;
52 INSERT_PADDING_BYTES(7);
53 u8 unk_0C[0x60];
54 u8 unk_6C[0x16];
55 INSERT_PADDING_BYTES(2);
56};
57static_assert(sizeof(MiiResult) == 0x84, "MiiResult structure has incorrect size");
58#define ASSERT_REG_POSITION(field_name, position) static_assert(offsetof(MiiResult, field_name) == position, "Field "#field_name" has invalid position")
59ASSERT_REG_POSITION(unk_0C, 0x0C);
60ASSERT_REG_POSITION(unk_6C, 0x6C);
61#undef ASSERT_REG_POSITION
62
19class MiiSelector final : public Applet { 63class MiiSelector final : public Applet {
20public: 64public:
21 MiiSelector(Service::APT::AppletId id); 65 MiiSelector(Service::APT::AppletId id);