Skip to content

Commit

Permalink
hid: set SYSTEM/SYSTEM_EXT as supported styles.
Browse files Browse the repository at this point in the history
Starting in 9.0.0, HID shared memory no longer populates
the SystemExt controller (which libnx calls LAYOUT_DEFAULT) unless
it is explicitly set as supported. This changes hidInitialize() to
set it and System as supported.
  • Loading branch information
SciresM authored and fincs committed Sep 12, 2019
1 parent b06a6ff commit 1a676a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions nx/include/switch/services/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ typedef enum
TYPE_JOYCON_PAIR = BIT(2),
TYPE_JOYCON_LEFT = BIT(3),
TYPE_JOYCON_RIGHT = BIT(4),

TYPE_SYSTEM_EXT = BIT(29),
TYPE_SYSTEM = BIT(30),
} HidControllerType;

typedef enum
Expand Down
2 changes: 1 addition & 1 deletion nx/source/services/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Result hidInitialize(void)
rc = _hidActivateNpad();

if (R_SUCCEEDED(rc))
rc = hidSetSupportedNpadStyleSet(TYPE_PROCONTROLLER | TYPE_HANDHELD | TYPE_JOYCON_PAIR | TYPE_JOYCON_LEFT | TYPE_JOYCON_RIGHT);
rc = hidSetSupportedNpadStyleSet(TYPE_PROCONTROLLER | TYPE_HANDHELD | TYPE_JOYCON_PAIR | TYPE_JOYCON_LEFT | TYPE_JOYCON_RIGHT | TYPE_SYSTEM_EXT | TYPE_SYSTEM);

if (R_SUCCEEDED(rc))
rc = hidSetSupportedNpadIdType(idbuf, 9);
Expand Down

0 comments on commit 1a676a6

Please sign in to comment.