MiiEdit Applet

From Nintendo Switch Brew
Jump to navigation Jump to search

This is the MiiEdit applet. See AM_services#Library_Applets.

AppletInput

This is "nn::mii::AppletInput". This struct is 0x100-bytes.

Offset Size Description
0x0 0x4 s32. Always set to value 0x3 ([10.2.0+] 0x4).
0x4 0x4 #AppletMode
0x8 0x4 SpecialMiiKeyCode
0xC 8*0x10(0x80) ValidUuidArray ("nn::util::Uuid" array). Only used with #AppletMode AppendMiiImage/UpdateMiiImage.
0xC 0x58 [10.2.0+] CharInfo. Only used with #AppletMode EditMii.
0x8C 0x10 UsedUuid ("nn::util::Uuid"). Only used with #AppletMode UpdateMiiImage.
0x9C 0x64 Unused by sdknso.

AppletOutput

This is "nn::mii::AppletOutput". This struct is 0x20-bytes.

Offset Size Description
0x0 0x4 Result: 0 = Success, 1 = Cancel.
0x4 0x4 s32 Index. Only set when Result is Success, where #AppletMode isn't ShowMiiEdit.
0x8 0x18 Unused by sdknso.

When Result is Cancel with #AppletMode ShowMiiEdit, sdknso will return rc=0, same as Success.

AppletOutputForCharInfoEditing

This is "nn::mii::AppletOutputForCharInfoEditing". This struct is 0x80-bytes.

This was added with [10.2.0+].

Offset Size Description
0x0 0x4 Handled the same as #AppletOutput+0.
0x4 0x58 CharInfo
0x5C 0x24 Unused

AppletMode

This is "nn::mii::AppletMode".

Value Description
0 ShowMiiEdit
1 AppendMii
2 AppendMiiImage
3 UpdateMiiImage
4 [10.2.0+] CreateMii
5 [10.2.0+] EditMii
  • CreateMii: This creates a Mii and returns it, without saving it in the database.
  • EditMii: This edits the specified Mii and returns it, without saving it in the database.

Usage

User-processes should push a storage containing the #AppletInput struct (commonargs is not used). Once the applet finishes running successfully, it will return an output storage containing an #AppletOutput (#AppletOutputForCharInfoEditing with #AppletMode CreateMii/EditMii).