mirror of
https://github.com/switchbrew/libnx.git
synced 2025-08-05 16:09:24 +02:00
Added appletGetAppletResourceUserIdOfCallerApplet, appletSetAppletWindowVisibility, and appletSetAppletGpuTimeSlice. Minor other change.
This commit is contained in:
parent
01d648e7ed
commit
7310c8f880
@ -588,6 +588,29 @@ Result appletGetProgramTotalActiveTime(u64 *activeTime);
|
|||||||
*/
|
*/
|
||||||
Result appletSetApplicationAlbumUserData(const void* buffer, size_t size);
|
Result appletSetApplicationAlbumUserData(const void* buffer, size_t size);
|
||||||
|
|
||||||
|
// IWindowController
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Gets the AppletResourceUserId of the CallerApplet.
|
||||||
|
* @note Only available with [6.0.0+].
|
||||||
|
* @param[out] out AppletResourceUserId
|
||||||
|
*/
|
||||||
|
Result appletGetAppletResourceUserIdOfCallerApplet(u64 *out);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the current applet WindowVisibility.
|
||||||
|
* @note Only available with [7.0.0+].
|
||||||
|
* @param[in] flag Flag
|
||||||
|
*/
|
||||||
|
Result appletSetAppletWindowVisibility(bool flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the AppletGpuTimeSlice.
|
||||||
|
* @note Only available with [7.0.0+].
|
||||||
|
* @param[in] val Input value, must not be negative.
|
||||||
|
*/
|
||||||
|
Result appletSetAppletGpuTimeSlice(s64 val);
|
||||||
|
|
||||||
// ILibraryAppletCreator
|
// ILibraryAppletCreator
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1895,10 +1895,6 @@ static Result _appletGetAppletResourceUserId(u64 *out) {
|
|||||||
return _appletCmdNoInOut64(&g_appletIWindowController, out, 1);
|
return _appletCmdNoInOut64(&g_appletIWindowController, out, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletAcquireForegroundRights(void) {
|
|
||||||
return _appletCmdNoIO(&g_appletIWindowController, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
Result appletGetAppletResourceUserId(u64 *out) {
|
Result appletGetAppletResourceUserId(u64 *out) {
|
||||||
if (!serviceIsActive(&g_appletSrv))
|
if (!serviceIsActive(&g_appletSrv))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
@ -1907,6 +1903,33 @@ Result appletGetAppletResourceUserId(u64 *out) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result appletGetAppletResourceUserIdOfCallerApplet(u64 *out) {
|
||||||
|
if (hosversionBefore(6,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
if (!serviceIsActive(&g_appletSrv))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
|
|
||||||
|
return _appletCmdNoInOut64(&g_appletIWindowController, out, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Result _appletAcquireForegroundRights(void) {
|
||||||
|
return _appletCmdNoIO(&g_appletIWindowController, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result appletSetAppletWindowVisibility(bool flag) {
|
||||||
|
if (hosversionBefore(7,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _appletCmdInBool(&g_appletIWindowController, flag, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result appletSetAppletGpuTimeSlice(s64 val) {
|
||||||
|
if (hosversionBefore(7,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _appletCmdInU64(&g_appletIWindowController, val, 21);
|
||||||
|
}
|
||||||
|
|
||||||
// ILibraryAppletCreator
|
// ILibraryAppletCreator
|
||||||
|
|
||||||
static Result _appletCreateLibraryApplet(Service* srv_out, AppletId id, LibAppletMode mode) {
|
static Result _appletCreateLibraryApplet(Service* srv_out, AppletId id, LibAppletMode mode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user