diff --git a/nx/include/switch/services/applet.h b/nx/include/switch/services/applet.h index a9fa1c2e..69739844 100644 --- a/nx/include/switch/services/applet.h +++ b/nx/include/switch/services/applet.h @@ -252,6 +252,24 @@ Result appletSetScreenShotPermission(s32 val); Result appletSetScreenShotImageOrientation(s32 val); +/** + * @brief Stops forwarding the input to the foreground app, works only in the Overlay applet context. + * @note You have to call this to receive inputs through the hid service when running as the overlay applet. + */ +Result appletBeginToWatchShortHomeButtonMessage(void); + +/** + * @brief Forwards input to the foreground app, works only in the Overlay applet context. + * @note After calling this the overlay applet won't receive any input until \ref appletBeginToWatchShortHomeButtonMessage is called again. + */ +Result appletEndToWatchShortHomeButtonMessage(void); + +/** + * @brief Get an event that fires when the home button is pressed, doesn't interfere with home menu. This event does not auto clear. + * @note Doesn't fire for long press. + */ +Result appletHomeButtonReaderLockAccessorGetEvent(Event *out_event); + /** * @brief Pushes a storage to the general channel. Used for sending requests to qlaunch. * @note This is not usable under an Application, however it is usable under a LibraryApplet. @@ -467,22 +485,4 @@ u8 appletGetOperationMode(void); u32 appletGetPerformanceMode(void); AppletFocusState appletGetFocusState(void); -Result appletSetFocusHandlingMode(AppletFocusHandlingMode mode); - -/** - * @brief Stops forwarding the input to the foreground app, works only in the Overlay applet context. - * @note You have to call this to receive inputs through the hid service when running as the overlay applet. - */ -Result appletBeginToWatchShortHomeButtonMessage(void); - -/** - * @brief Forwards input to the foreground app, works only in the Overlay applet context. - * @note After calling this the overlay applet won't receive any input until \ref appletBeginToWatchShortHomeButtonMessage is called again. - */ -Result appletEndToWatchShortHomeButtonMessage(void); - -/** - * @brief Get an event that fires when the home button is pressed, doesn't interfere with home menu. This event does not auto clear. - * @note Doesn't fire for long press. - */ -Result appletHomeButtonReaderLockAccessorGetEvent(Event *out_event); \ No newline at end of file +Result appletSetFocusHandlingMode(AppletFocusHandlingMode mode); \ No newline at end of file diff --git a/nx/include/switch/services/hidsys.h b/nx/include/switch/services/hidsys.h index 52e3093e..312e6814 100644 --- a/nx/include/switch/services/hidsys.h +++ b/nx/include/switch/services/hidsys.h @@ -16,4 +16,8 @@ Result hidsysEnableAppletToGetInput(bool enable); /** * @brief Returns an event that fires when the home button is pressed, this will prevent the home menu from opening when the button is pressed. This event does not auto clear. **/ -Result hidsysAcquireHomeButtonEventHandle(Event* event_out); \ No newline at end of file +Result hidsysAcquireHomeButtonEventHandle(Event* event_out); + +Result hidsysActivateHomeButton(void); +Result hidsysActivateSleepButton(void); +Result hidsysActivateCaptureButton(void); \ No newline at end of file diff --git a/nx/source/services/hidsys.c b/nx/source/services/hidsys.c index 19172a66..4180f075 100644 --- a/nx/source/services/hidsys.c +++ b/nx/source/services/hidsys.c @@ -3,8 +3,6 @@ #include "result.h" #include "arm/atomics.h" #include "kernel/ipc.h" -#include "kernel/shmem.h" -#include "kernel/rwlock.h" #include "kernel/event.h" #include "services/applet.h" #include "services/hidsys.h"