mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
hidsys: add commands for setting/checking state of joycons attached via rails
This commit is contained in:
parent
88de3cbea7
commit
29a6691b66
@ -323,6 +323,51 @@ Result hidsysGetUniquePadsFromNpad(HidNpadIdType id, HidsysUniquePadId *unique_p
|
|||||||
**/
|
**/
|
||||||
Result hidsysEnableAppletToGetInput(bool enable);
|
Result hidsysEnableAppletToGetInput(bool enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief EnableHandheldHids
|
||||||
|
**/
|
||||||
|
Result hidsysEnableHandheldHids(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DisableHandheldHids
|
||||||
|
**/
|
||||||
|
Result hidsysDisableHandheldHids(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetJoyConRailEnabled
|
||||||
|
* @note Only available on [9.0.0+].
|
||||||
|
* @param[in] enable Input flag.
|
||||||
|
**/
|
||||||
|
Result hidsysSetJoyConRailEnabled(bool enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief IsJoyConRailEnabled
|
||||||
|
* @note Only available on [9.0.0+].
|
||||||
|
* @param[out] out Output flag.
|
||||||
|
**/
|
||||||
|
Result hidsysIsJoyConRailEnabled(bool *out);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief IsHandheldHidsEnabled
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] out Output flag.
|
||||||
|
**/
|
||||||
|
Result hidsysIsHandheldHidsEnabled(bool *out);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief IsJoyConAttachedOnAllRail
|
||||||
|
* @note Only available on [11.0.0+].
|
||||||
|
* @param[out] out Output flag.
|
||||||
|
**/
|
||||||
|
Result hidsysIsJoyConAttachedOnAllRail(bool *out);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief IsInvertedControllerConnectedOnRail
|
||||||
|
* @note Only available on [19.0.0+].
|
||||||
|
* @param[out] out Output flag.
|
||||||
|
**/
|
||||||
|
Result hidsysIsInvertedControllerConnectedOnRail(bool *out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief AcquireUniquePadConnectionEventHandle
|
* @brief AcquireUniquePadConnectionEventHandle
|
||||||
* @param[out] out_event Output Event.
|
* @param[out] out_event Output Event.
|
||||||
|
@ -340,6 +340,49 @@ Result hidsysEnableAppletToGetInput(bool enable) {
|
|||||||
return serviceDispatchIn(&g_hidsysSrv, 503, in);
|
return serviceDispatchIn(&g_hidsysSrv, 503, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result hidsysEnableHandheldHids(void) {
|
||||||
|
return _hidsysCmdNoIO(520);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result hidsysDisableHandheldHids(void) {
|
||||||
|
return _hidsysCmdNoIO(521);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result hidsysSetJoyConRailEnabled(bool enable) {
|
||||||
|
if (hosversionBefore(9,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _hidsysCmdInBoolNoOut(enable, 522);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result hidsysIsJoyConRailEnabled(bool *out) {
|
||||||
|
if (hosversionBefore(9,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _hidsysCmdNoInOutBool(out, 523);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result hidsysIsHandheldHidsEnabled(bool *out) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _hidsysCmdNoInOutBool(out, 524);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result hidsysIsJoyConAttachedOnAllRail(bool *out) {
|
||||||
|
if (hosversionBefore(11,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _hidsysCmdNoInOutBool(out, 525);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result hidsysIsInvertedControllerConnectedOnRail(bool *out) {
|
||||||
|
if (hosversionBefore(19,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _hidsysCmdNoInOutBool(out, 526);
|
||||||
|
}
|
||||||
|
|
||||||
Result hidsysAcquireUniquePadConnectionEventHandle(Event *out_event) {
|
Result hidsysAcquireUniquePadConnectionEventHandle(Event *out_event) {
|
||||||
Handle tmp_handle = INVALID_HANDLE;
|
Handle tmp_handle = INVALID_HANDLE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user