Jump to navigation Jump to search
26 bytes added ,  04:06, 27 November 2019
== ControllerSupportArg ==
This is "nn::hid::ControllerSupportArg". This is a 0x21C-byte (0x9C-byte with version <=0x2, 0x430-byte with version 0x7) struct pushed for input storage.
Layout with the original version:
| 0x1 || 0x1 || s8 playerCountMax, must be >=1 and <=4.
| 0x2 || 0x4 || Unknownu8 flags, copied into state as individual bytesnon-zero for enabled.
| 0x6 || 0x1 || Enables using the 0x10-bytes array at offset 0x7 when non-zero.
| 0x7 || 0x10 4*max_controllers || UnknownArray of 4-byte entries for each controller, copied into state as see below for total entries (max controllers). This entry contains individual bytesu8s.
| 0x17 0x7 + 4*max_controllers || 0x1 || Enables using the ExplainText data when non-zero.
Layout starting with version 0x7: {| class="wikitable" border="1"|-! Offset! Size! Description|-| 0x0 || 0x28 || ?|} With both versions, the rest of the struct is an array containing 0x81-byte (0x21-byte with version <=0x2) entries. With the original version pre-0x7 there's 4 entries allocated, starting with version 0x7 there's 8 entries allocated. This contains the ExplainText string which includes the NUL-terminator. Each entry corresponds to a controller NpadId, starting with NpadId/controller 0.
Regardless of version, the default data for this struct is setup by setting u32 +0 to 0x01010400, u8 +4 to 0x1, with the rest being cleared as needed. sdknso itself only calls the func for this from ShowControllerStrapGuide, since that's the only time sdknso itself writes to ControllerSupportArg besides ExplainText (and is also the only case where the ControllerSupportArg is not user-specified).

Navigation menu