mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
hiddbg: Added support for SleepButton AutoPilot.
This commit is contained in:
parent
ae3271ba4c
commit
d4542ec9b0
@ -40,6 +40,11 @@ typedef struct {
|
|||||||
u64 keys[4];
|
u64 keys[4];
|
||||||
} HiddbgKeyboardAutoPilotState;
|
} HiddbgKeyboardAutoPilotState;
|
||||||
|
|
||||||
|
/// State for overriding SleepButtonState.
|
||||||
|
typedef struct {
|
||||||
|
u64 buttons; ///< Bitfield of buttons, only bit0 is used.
|
||||||
|
} HiddbgSleepButtonAutoPilotState;
|
||||||
|
|
||||||
/// HdlsHandle
|
/// HdlsHandle
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 handle; ///< Handle
|
u64 handle; ///< Handle
|
||||||
@ -215,6 +220,17 @@ Result hiddbgUnsetKeyboardAutoPilotState(void);
|
|||||||
*/
|
*/
|
||||||
Result hiddbgDeactivateHomeButton(void);
|
Result hiddbgDeactivateHomeButton(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetSleepButtonAutoPilotState
|
||||||
|
* @param[in] state \ref HiddbgSleepButtonAutoPilotState
|
||||||
|
*/
|
||||||
|
Result hiddbgSetSleepButtonAutoPilotState(const HiddbgSleepButtonAutoPilotState *state);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief UnsetSleepButtonAutoPilotState
|
||||||
|
*/
|
||||||
|
Result hiddbgUnsetSleepButtonAutoPilotState(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Writes the input RGB colors to the spi-flash for the specified UniquePad (offset 0x6050 size 0x6).
|
* @brief Writes the input RGB colors to the spi-flash for the specified UniquePad (offset 0x6050 size 0x6).
|
||||||
* @note Only available with [3.0.0+].
|
* @note Only available with [3.0.0+].
|
||||||
|
@ -115,6 +115,14 @@ Result hiddbgDeactivateHomeButton(void) {
|
|||||||
return _hiddbgCmdNoIO(110);
|
return _hiddbgCmdNoIO(110);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result hiddbgSetSleepButtonAutoPilotState(const HiddbgSleepButtonAutoPilotState *state) {
|
||||||
|
return serviceDispatchIn(&g_hiddbgSrv, 121, *state);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result hiddbgUnsetSleepButtonAutoPilotState(void) {
|
||||||
|
return _hiddbgCmdNoIO(122);
|
||||||
|
}
|
||||||
|
|
||||||
Result hiddbgUpdateControllerColor(u32 colorBody, u32 colorButtons, HidsysUniquePadId unique_pad_id) {
|
Result hiddbgUpdateControllerColor(u32 colorBody, u32 colorButtons, HidsysUniquePadId unique_pad_id) {
|
||||||
if (hosversionBefore(3,0,0))
|
if (hosversionBefore(3,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
Loading…
Reference in New Issue
Block a user