mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Added appletGetLaunchStorageInfoForDebug.
This commit is contained in:
parent
8135d6cbc5
commit
c3b32581c9
@ -1211,6 +1211,14 @@ Result appletSetTerminateResult(Result res);
|
||||
*/
|
||||
Result appletGetDisplayVersion(char *displayVersion);
|
||||
|
||||
/**
|
||||
* @brief Gets the LaunchStorageInfo.
|
||||
* @note Only available with AppletType_*Application on [2.0.0+].
|
||||
* @param[out] app_storageId Same as AppletApplicationLaunchProperty::app_storageId.
|
||||
* @param[out] update_storageId Same as AppletApplicationLaunchProperty::update_storageId.
|
||||
*/
|
||||
Result appletGetLaunchStorageInfoForDebug(FsStorageId *app_storageId, FsStorageId *update_storageId);
|
||||
|
||||
/**
|
||||
* @brief Blocks the usage of the home button, for short (Home Menu) and long (Overlay) presses.
|
||||
* @note Only available with AppletType_*Application.
|
||||
|
@ -3772,6 +3772,48 @@ Result appletGetDisplayVersion(char *displayVersion) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result appletGetLaunchStorageInfoForDebug(FsStorageId *app_storageId, FsStorageId *update_storageId) {
|
||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
if (hosversionBefore(2,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
IpcCommand c;
|
||||
ipcInitialize(&c);
|
||||
|
||||
struct {
|
||||
u64 magic;
|
||||
u64 cmd_id;
|
||||
} *raw;
|
||||
|
||||
raw = serviceIpcPrepareHeader(&g_appletIFunctions, &c, sizeof(*raw));
|
||||
|
||||
raw->magic = SFCI_MAGIC;
|
||||
raw->cmd_id = 24;
|
||||
|
||||
Result rc = serviceIpcDispatch(&g_appletIFunctions);
|
||||
|
||||
if (R_SUCCEEDED(rc)) {
|
||||
IpcParsedCommand r;
|
||||
struct {
|
||||
u64 magic;
|
||||
u64 result;
|
||||
u8 app_storageId;
|
||||
u8 update_storageId;
|
||||
} *resp;
|
||||
|
||||
serviceIpcParse(&g_appletIFunctions, &r, sizeof(*resp));
|
||||
resp = r.Raw;
|
||||
|
||||
rc = resp->result;
|
||||
|
||||
if (R_SUCCEEDED(rc) && app_storageId) *app_storageId = resp->app_storageId;
|
||||
if (R_SUCCEEDED(rc) && update_storageId) *update_storageId = resp->update_storageId;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result appletBeginBlockingHomeButtonShortAndLongPressed(s64 val) {
|
||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
|
Loading…
Reference in New Issue
Block a user