diff options
| author | 2016-05-05 12:56:36 -0700 | |
|---|---|---|
| committer | 2016-05-05 12:56:36 -0700 | |
| commit | 24d064e8300d19272a2b527687ab889f351d8bf5 (patch) | |
| tree | 8b45b53fdc97f9093606f906bd7783ceffcfbf21 /src | |
| parent | Merge pull request #1757 from JayFoxRox/rename-vertexloaded-bp (diff) | |
| parent | Layout Mii parameters input/output, and return success as result of applet work (diff) | |
| download | yuzu-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.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/applets/mii_selector.h | 44 |
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 @@ | |||
| 16 | namespace HLE { | 16 | namespace HLE { |
| 17 | namespace Applets { | 17 | namespace Applets { |
| 18 | 18 | ||
| 19 | struct 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 | |||
| 40 | static_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") | ||
| 42 | ASSERT_REG_POSITION(unk_008, 0x08); | ||
| 43 | ASSERT_REG_POSITION(unk_08C, 0x8C); | ||
| 44 | ASSERT_REG_POSITION(unk_090, 0x90); | ||
| 45 | ASSERT_REG_POSITION(unk_094, 0x94); | ||
| 46 | ASSERT_REG_POSITION(unk_0FE, 0xFE); | ||
| 47 | #undef ASSERT_REG_POSITION | ||
| 48 | |||
| 49 | struct 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 | }; | ||
| 57 | static_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") | ||
| 59 | ASSERT_REG_POSITION(unk_0C, 0x0C); | ||
| 60 | ASSERT_REG_POSITION(unk_6C, 0x6C); | ||
| 61 | #undef ASSERT_REG_POSITION | ||
| 62 | |||
| 19 | class MiiSelector final : public Applet { | 63 | class MiiSelector final : public Applet { |
| 20 | public: | 64 | public: |
| 21 | MiiSelector(Service::APT::AppletId id); | 65 | MiiSelector(Service::APT::AppletId id); |