Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions nx/include/switch/services/hidsys.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,13 @@ Result hidsysHasLeftRightBattery(HidNpadIdType id, bool *out0, bool *out1);
*/
Result hidsysGetUniquePadsFromNpad(HidNpadIdType id, HidsysUniquePadId *unique_pad_ids, s32 count, s32 *total_out);

/**
* @brief Sets information that your AppletResourceUserId is in focus.
* @note This is automatically used by am-sysmodule, don't use it if your AppletType is other than None.
* @note Using it with uninitialized applet services results in your process being tied to currently focused applet.
*/
Result hidsysSetAppletResourceUserId(void);

/**
* @brief EnableAppletToGetInput
* @param[in] enable Input flag.
Expand Down
4 changes: 4 additions & 0 deletions nx/source/services/hidsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ Result hidsysGetUniquePadsFromNpad(HidNpadIdType id, HidsysUniquePadId *unique_p
return rc;
}

Result hidsysSetAppletResourceUserId(void) {
return serviceDispatchIn(&g_hidsysSrv, 500, g_hidsysAppletResourceUserId);
}

Result hidsysEnableAppletToGetInput(bool enable) {
const struct {
u8 permitInput;
Expand Down
Loading