diff options
author | mailwl <mailwl@gmail.com> | 2016-04-24 11:39:06 +0200 |
---|---|---|
committer | mailwl <mailwl@gmail.com> | 2016-05-05 21:31:33 +0200 |
commit | e311398a2202a174541144aeaa297752fab4d79b (patch) | |
tree | 8b45b53fdc97f9093606f906bd7783ceffcfbf21 /src/core | |
parent | Merge pull request #1757 from JayFoxRox/rename-vertexloaded-bp (diff) | |
download | yuzu-e311398a2202a174541144aeaa297752fab4d79b.tar yuzu-e311398a2202a174541144aeaa297752fab4d79b.tar.gz yuzu-e311398a2202a174541144aeaa297752fab4d79b.tar.bz2 yuzu-e311398a2202a174541144aeaa297752fab4d79b.tar.lz yuzu-e311398a2202a174541144aeaa297752fab4d79b.tar.xz yuzu-e311398a2202a174541144aeaa297752fab4d79b.tar.zst yuzu-e311398a2202a174541144aeaa297752fab4d79b.zip |
Diffstat (limited to 'src/core')
-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 // TODO(Subv): Set the expected fields in the response buffer before resending it to the application. // TODO(Subv): Reverse the parameter format for the Mii Selector + if(parameter.buffer_size >= sizeof(u32)) { + // TODO: defaults return no error, but garbage in other unknown fields + memset(parameter.data, 0, sizeof(u32)); + } + // Let the application know that we're closing Service::APT::MessageParameter message; 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 @@ namespace HLE { namespace Applets { +struct MiiConfig { + u8 unk_000; + u8 unk_001; + u8 unk_002; + u8 unk_003; + u8 unk_004; + INSERT_PADDING_BYTES(3); + u16 unk_008; + INSERT_PADDING_BYTES(0x8C - 0xA); + u8 unk_08C; + INSERT_PADDING_BYTES(3); + u16 unk_090; + INSERT_PADDING_BYTES(2); + u32 unk_094; + u16 unk_098; + u8 unk_09A[0x64]; + u8 unk_0FE; + u8 unk_0FF; + u32 unk_100; +}; + +static_assert(sizeof(MiiConfig) == 0x104, "MiiConfig structure has incorrect size"); +#define ASSERT_REG_POSITION(field_name, position) static_assert(offsetof(MiiConfig, field_name) == position, "Field "#field_name" has invalid position") +ASSERT_REG_POSITION(unk_008, 0x08); +ASSERT_REG_POSITION(unk_08C, 0x8C); +ASSERT_REG_POSITION(unk_090, 0x90); +ASSERT_REG_POSITION(unk_094, 0x94); +ASSERT_REG_POSITION(unk_0FE, 0xFE); +#undef ASSERT_REG_POSITION + +struct MiiResult { + u32 result_code; + u8 unk_04; + INSERT_PADDING_BYTES(7); + u8 unk_0C[0x60]; + u8 unk_6C[0x16]; + INSERT_PADDING_BYTES(2); +}; +static_assert(sizeof(MiiResult) == 0x84, "MiiResult structure has incorrect size"); +#define ASSERT_REG_POSITION(field_name, position) static_assert(offsetof(MiiResult, field_name) == position, "Field "#field_name" has invalid position") +ASSERT_REG_POSITION(unk_0C, 0x0C); +ASSERT_REG_POSITION(unk_6C, 0x6C); +#undef ASSERT_REG_POSITION + class MiiSelector final : public Applet { public: MiiSelector(Service::APT::AppletId id); |