diff --git a/nx/include/switch/services/applet.h b/nx/include/switch/services/applet.h index ee02c6f0..2fc56b32 100644 --- a/nx/include/switch/services/applet.h +++ b/nx/include/switch/services/applet.h @@ -2468,6 +2468,10 @@ AppletOperationMode appletGetOperationMode(void); ApmPerformanceMode appletGetPerformanceMode(void); AppletFocusState appletGetFocusState(void); +/** + * @brief Sets the current \ref AppletFocusHandlingMode. + * @note Should only be called with AppletType_Application. + */ Result appletSetFocusHandlingMode(AppletFocusHandlingMode mode); ///@} diff --git a/nx/source/services/applet.c b/nx/source/services/applet.c index e66ac5ba..f83ed9f0 100644 --- a/nx/source/services/applet.c +++ b/nx/source/services/applet.c @@ -541,6 +541,8 @@ Result appletSetFocusHandlingMode(AppletFocusHandlingMode mode) { Result rc; bool invals[4]; + if (__nx_applet_type != AppletType_Application) + return MAKERESULT(Module_Libnx, LibnxError_NotInitialized); if (mode >= AppletFocusHandlingMode_Max) return MAKERESULT(Module_Libnx, LibnxError_BadInput);