mirror of
https://github.com/switchbrew/libnx.git
synced 2025-08-05 07:59:24 +02:00
applet: appletSetFocusHandlingMode should only be used with Application
This commit is contained in:
parent
7ce58f84e0
commit
8421863c78
@ -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);
|
||||
|
||||
///@}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user