apm/applet: Updated names/docs.

Added AppletWindowOriginMode.
This commit is contained in:
yellows8 2020-12-15 11:14:35 -05:00
parent d406db725d
commit ccec5bd36c
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
13 changed files with 89 additions and 80 deletions

View File

@ -10,15 +10,16 @@
/// PerformanceMode
typedef enum {
ApmPerformanceMode_Handheld = 0, ///< Handheld
ApmPerformanceMode_Docked = 1, ///< Docked
ApmPerformanceMode_Invalid = -1, ///< Invalid
ApmPerformanceMode_Normal = 0, ///< Normal
ApmPerformanceMode_Boost = 1, ///< Boost
} ApmPerformanceMode;
/// CpuBoostMode. With \ref appletSetCpuBoostMode, only values 0/1 are available. This allows using higher clock rates.
typedef enum {
ApmCpuBoostMode_Disabled = 0, ///< Default, use normal PerformanceConfiguration.
ApmCpuBoostMode_Type1 = 1, ///< Use performance configurations 0x92220009 (Docked) and 0x9222000A (Handheld), or 0x9222000B and 0x9222000C. All of these use the normal GPU clock rate for Docked-mode. The latter pair uses the normal CPU clock rate, while the former pair uses the maximum TX1 CPU clock rate. Memory clock rate is the same as normal.
ApmCpuBoostMode_Type2 = 2, ///< Use performance configurations 0x9222000B and 0x9222000C.
ApmCpuBoostMode_Normal = 0, ///< Default, boost-mode disabled.
ApmCpuBoostMode_FastLoad = 1, ///< Boost CPU. Additionally, throttle GPU to minimum. Use performance configurations 0x92220009 (Docked) and 0x9222000A (Handheld), or 0x9222000B and 0x9222000C.
ApmCpuBoostMode_Type2 = 2, ///< Conserve power. Only throttle GPU to minimum. Use performance configurations 0x9222000B and 0x9222000C.
} ApmCpuBoostMode;
/// Initialize apm. Used automatically by \ref appletInitialize with AppletType_Application.

View File

@ -32,8 +32,8 @@ typedef enum {
/// OperationMode
typedef enum {
AppletOperationMode_Handheld = 0,
AppletOperationMode_Docked = 1,
AppletOperationMode_Handheld = 0, ///< Handheld
AppletOperationMode_Console = 1, ///< Console (Docked / TV-mode)
} AppletOperationMode;
/// applet hook types.
@ -42,9 +42,9 @@ typedef enum {
AppletHookType_OnOperationMode, ///< ::AppletMessage_OperationModeChanged
AppletHookType_OnPerformanceMode, ///< ::AppletMessage_PerformanceModeChanged
AppletHookType_OnExitRequest, ///< ::AppletMessage_ExitRequested
AppletHookType_OnRestart, ///< ::AppletMessage_Restart
AppletHookType_OnResume, ///< ::AppletMessage_Resume
AppletHookType_OnCaptureButtonShortPressed, ///< ::AppletMessage_CaptureButtonShortPressed
AppletHookType_OnAlbumImageTaken, ///< ::AppletMessage_AlbumImageTaken
AppletHookType_OnAlbumScreenShotTaken, ///< ::AppletMessage_AlbumScreenShotTaken
AppletHookType_RequestToDisplay, ///< ::AppletMessage_RequestToDisplay
AppletHookType_Max, ///< Number of applet hook types.
@ -52,31 +52,32 @@ typedef enum {
/// AppletMessage, for \ref appletGetMessage. See also \ref AppletHookType.
typedef enum {
AppletMessage_ExitRequested = 0x4, ///< Exit requested.
AppletMessage_FocusStateChanged = 0xF, ///< FocusState changed.
AppletMessage_Restart = 0x10, ///< Current applet execution was resumed.
AppletMessage_OperationModeChanged = 0x1E, ///< OperationMode changed.
AppletMessage_PerformanceModeChanged = 0x1F, ///< PerformanceMode changed.
AppletMessage_RequestToDisplay = 0x33, ///< Display requested, see \ref appletApproveToDisplay.
AppletMessage_CaptureButtonShortPressed = 0x5A, ///< Capture button was short-pressed.
AppletMessage_AlbumImageTaken = 0x5C, ///< Screenshot was taken.
AppletMessage_ExitRequest = 4, ///< Exit request.
AppletMessage_FocusStateChanged = 15, ///< FocusState changed.
AppletMessage_Resume = 16, ///< Current applet execution was resumed.
AppletMessage_OperationModeChanged = 30, ///< OperationMode changed.
AppletMessage_PerformanceModeChanged = 31, ///< PerformanceMode changed.
AppletMessage_RequestToDisplay = 51, ///< Display requested, see \ref appletApproveToDisplay.
AppletMessage_CaptureButtonShortPressed = 90, ///< Capture button was short-pressed.
AppletMessage_AlbumScreenShotTaken = 92, ///< Screenshot was taken.
AppletMessage_AlbumRecordingSaved = 93, ///< AlbumRecordingSaved
} AppletMessage;
/// FocusState
typedef enum {
AppletFocusState_Focused = 1, ///< Applet is focused.
AppletFocusState_NotFocusedLibraryApplet = 2, ///< Out of focus - LibraryApplet open.
AppletFocusState_NotFocusedHomeSleep = 3 ///< Out of focus - HOME menu open / console is sleeping.
AppletFocusState_InFocus = 1, ///< Applet is focused.
AppletFocusState_OutOfFocus = 2, ///< Out of focus - LibraryApplet open.
AppletFocusState_Background = 3 ///< Out of focus - HOME menu open / console is sleeping.
} AppletFocusState;
/// FocusHandlingMode
typedef enum {
AppletFocusHandlingMode_SuspendHomeSleep = 0, ///< Suspend only when HOME menu is open / console is sleeping (default).
AppletFocusHandlingMode_NoSuspend, ///< Don't suspend when out of focus.
AppletFocusHandlingMode_SuspendHomeSleepNotify, ///< Suspend only when HOME menu is open / console is sleeping but still receive OnFocusState hook.
AppletFocusHandlingMode_AlwaysSuspend, ///< Always suspend when out of focus, regardless of the reason.
AppletFocusHandlingMode_SuspendHomeSleep = 0, ///< Suspend only when HOME menu is open / console is sleeping (default).
AppletFocusHandlingMode_NoSuspend, ///< Don't suspend when out of focus.
AppletFocusHandlingMode_SuspendHomeSleepNotify, ///< Suspend only when HOME menu is open / console is sleeping but still receive OnFocusState hook.
AppletFocusHandlingMode_AlwaysSuspend, ///< Always suspend when out of focus, regardless of the reason.
AppletFocusHandlingMode_Max, ///< Number of focus handling modes.
AppletFocusHandlingMode_Max, ///< Number of focus handling modes.
} AppletFocusHandlingMode;
/// LaunchParameterKind
@ -88,27 +89,28 @@ typedef enum {
/// AppletId
typedef enum {
AppletId_application = 0x01, ///< Application. Not valid for use with LibraryApplets.
AppletId_overlayDisp = 0x02, ///< 010000000000100C "overlayDisp"
AppletId_qlaunch = 0x03, ///< 0100000000001000 "qlaunch" (SystemAppletMenu)
AppletId_starter = 0x04, ///< 0100000000001012 "starter" SystemApplication.
AppletId_auth = 0x0A, ///< 0100000000001001 "auth"
AppletId_cabinet = 0x0B, ///< 0100000000001002 "cabinet"
AppletId_controller = 0x0C, ///< 0100000000001003 "controller"
AppletId_dataErase = 0x0D, ///< 0100000000001004 "dataErase"
AppletId_error = 0x0E, ///< 0100000000001005 "error"
AppletId_netConnect = 0x0F, ///< 0100000000001006 "netConnect"
AppletId_playerSelect = 0x10, ///< 0100000000001007 "playerSelect"
AppletId_swkbd = 0x11, ///< 0100000000001008 "swkbd"
AppletId_miiEdit = 0x12, ///< 0100000000001009 "miiEdit"
AppletId_web = 0x13, ///< 010000000000100A "LibAppletWeb" WebApplet applet
AppletId_shop = 0x14, ///< 010000000000100B "LibAppletShop" ShopN applet
AppletId_photoViewer = 0x15, ///< 010000000000100D "photoViewer"
AppletId_set = 0x16, ///< 010000000000100E "set" (This applet is currently not present on retail devices.)
AppletId_offlineWeb = 0x17, ///< 010000000000100F "LibAppletOff" Offline web-applet
AppletId_loginShare = 0x18, ///< 0100000000001010 "LibAppletLns" Whitelisted web-applet
AppletId_wifiWebAuth = 0x19, ///< 0100000000001011 "LibAppletAuth" WifiWebAuth applet
AppletId_myPage = 0x1A, ///< 0100000000001013 "myPage"
AppletId_None = 0x00, ///< None
AppletId_application = 0x01, ///< Application. Not valid for use with LibraryApplets.
AppletId_OverlayApplet = 0x02, ///< 010000000000100C "overlayDisp"
AppletId_SystemAppletMenu = 0x03, ///< 0100000000001000 "qlaunch" (SystemAppletMenu)
AppletId_SystemApplication = 0x04, ///< 0100000000001012 "starter" SystemApplication.
AppletId_LibraryAppletAuth = 0x0A, ///< 0100000000001001 "auth"
AppletId_LibraryAppletCabinet = 0x0B, ///< 0100000000001002 "cabinet"
AppletId_LibraryAppletController = 0x0C, ///< 0100000000001003 "controller"
AppletId_LibraryAppletDataErase = 0x0D, ///< 0100000000001004 "dataErase"
AppletId_LibraryAppletError = 0x0E, ///< 0100000000001005 "error"
AppletId_LibraryAppletNetConnect = 0x0F, ///< 0100000000001006 "netConnect"
AppletId_LibraryAppletPlayerSelect = 0x10, ///< 0100000000001007 "playerSelect"
AppletId_LibraryAppletSwkbd = 0x11, ///< 0100000000001008 "swkbd"
AppletId_LibraryAppletMiiEdit = 0x12, ///< 0100000000001009 "miiEdit"
AppletId_LibraryAppletWeb = 0x13, ///< 010000000000100A "LibAppletWeb" WebApplet applet
AppletId_LibraryAppletShop = 0x14, ///< 010000000000100B "LibAppletShop" ShopN applet
AppletId_LibraryAppletPhotoViewer = 0x15, ///< 010000000000100D "photoViewer"
AppletId_LibraryAppletSet = 0x16, ///< 010000000000100E "set" (This applet is currently not present on retail devices.)
AppletId_LibraryAppletOfflineWeb = 0x17, ///< 010000000000100F "LibAppletOff" offlineWeb applet
AppletId_LibraryAppletLoginShare = 0x18, ///< 0100000000001010 "LibAppletLns" loginShare web-applet
AppletId_LibraryAppletWifiWebAuth = 0x19, ///< 0100000000001011 "LibAppletAuth" wifiWebAuth applet
AppletId_LibraryAppletMyPage = 0x1A, ///< 0100000000001013 "myPage"
} AppletId;
/// LibraryAppletMode
@ -186,8 +188,8 @@ typedef enum {
/// Input mode values for \ref appletSetWirelessPriorityMode.
typedef enum {
AppletWirelessPriorityMode_Unknown1 = 1, ///< Unknown.
AppletWirelessPriorityMode_Unknown2 = 2, ///< Unknown.
AppletWirelessPriorityMode_Default = 1, ///< Default
AppletWirelessPriorityMode_OptimizedForWlan = 2, ///< OptimizedForWlan
} AppletWirelessPriorityMode;
/// CaptureSharedBuffer for the IDisplayController commands.
@ -197,6 +199,12 @@ typedef enum {
AppletCaptureSharedBuffer_CallerApplet = 2, ///< CallerApplet
} AppletCaptureSharedBuffer;
/// WindowOriginMode
typedef enum {
AppletWindowOriginMode_LowerLeft = 0, ///< LowerLeft
AppletWindowOriginMode_UpperLeft = 1, ///< UpperLeft
} AppletWindowOriginMode;
/// ProgramSpecifyKind for the ExecuteProgram cmd. Controls the type of the u64 passed to the ExecuteProgram cmd.
typedef enum {
AppletProgramSpecifyKind_ExecuteProgram = 0, ///< u8 ProgramIndex.
@ -719,7 +727,7 @@ Result appletLeaveFatalSection(void);
Result appletSetScreenShotPermission(AppletScreenShotPermission permission);
/**
* @brief Sets whether ::AppletMessage_Restart is enabled.
* @brief Sets whether ::AppletMessage_Resume is enabled.
* @param[in] flag Whether to enable the notification.
*/
Result appletSetRestartMessageEnabled(bool flag);
@ -901,7 +909,7 @@ Result appletSetWirelessPriorityMode(AppletWirelessPriorityMode mode);
Result appletGetProgramTotalActiveTime(u64 *activeTime);
/**
* @brief Sets whether ::AppletMessage_AlbumImageTaken is enabled.
* @brief Sets whether ::AppletMessage_AlbumScreenShotTaken is enabled.
* @note Only available with [7.0.0+].
* @param[in] flag Whether to enable the notification.
*/
@ -1575,9 +1583,9 @@ Result appletInitializeApplicationCopyrightFrameBuffer(void);
* @param[in] y Y coordinate. Must not be negative.
* @param[in] width Image width. Must be >=1.
* @param[in] height Image height. Must be >=1.
* @param[in] mode WindowOriginMode. Should be at least 1.
* @param[in] mode \ref AppletWindowOriginMode
*/
Result appletSetApplicationCopyrightImage(const void* buffer, size_t size, s32 x, s32 y, s32 width, s32 height, s32 mode);
Result appletSetApplicationCopyrightImage(const void* buffer, size_t size, s32 x, s32 y, s32 width, s32 height, AppletWindowOriginMode mode);
/**
* @brief Sets the visibility for the image set by \ref appletSetApplicationCopyrightImage, in screenshots.

View File

@ -9,7 +9,7 @@ static Result _albumLaShow(u8 arg, bool playStartupSound) {
libappletArgsCreate(&commonargs, 0x10000);
libappletArgsSetPlayStartupSound(&commonargs, playStartupSound);
rc = libappletLaunch(AppletId_photoViewer, &commonargs, &arg, sizeof(arg), NULL, 0, NULL);
rc = libappletLaunch(AppletId_LibraryAppletPhotoViewer, &commonargs, &arg, sizeof(arg), NULL, 0, NULL);
return rc;
}

View File

@ -7,7 +7,7 @@ static Result _errorAppletCreate(AppletHolder* holder, const void* indata, size_
Result rc=0;
LibAppletArgs commonargs;
rc = appletCreateLibraryApplet(holder, AppletId_error, LibAppletMode_AllForeground);
rc = appletCreateLibraryApplet(holder, AppletId_LibraryAppletError, LibAppletMode_AllForeground);
if (R_FAILED(rc)) return rc;
libappletArgsCreate(&commonargs, 0);

View File

@ -28,9 +28,9 @@ static Result _friendsLaShow(const FriendsLaArg *arg, bool playStartupSound) {
libappletArgsSetPlayStartupSound(&commonargs, playStartupSound);
if (arg->hdr.type != FriendsLaArgType_StartSendingFriendRequest && arg->hdr.type != FriendsLaArgType_StartFriendInvitation && arg->hdr.type != FriendsLaArgType_StartSendingFriendInvitation)
rc = libappletLaunch(AppletId_myPage, &commonargs, arg_ptr, arg_size, NULL, 0, NULL);
rc = libappletLaunch(AppletId_LibraryAppletMyPage, &commonargs, arg_ptr, arg_size, NULL, 0, NULL);
else {
rc = libappletLaunch(AppletId_myPage, &commonargs, arg_ptr, arg_size, &rc2, sizeof(rc2), &readsize);
rc = libappletLaunch(AppletId_LibraryAppletMyPage, &commonargs, arg_ptr, arg_size, &rc2, sizeof(rc2), &readsize);
if (R_SUCCEEDED(rc) && readsize!=sizeof(rc2)) rc = MAKERESULT(Module_Libnx, LibnxError_BadInput);
if (R_SUCCEEDED(rc)) rc = rc2;
}

View File

@ -16,7 +16,7 @@ static Result _hidLaShow(const HidLaControllerSupportArgPrivate *private_arg, co
else if (hosversionAtLeast(3,0,0))
version = 0x4;
rc = appletCreateLibraryApplet(&holder, AppletId_controller, LibAppletMode_AllForeground);
rc = appletCreateLibraryApplet(&holder, AppletId_LibraryAppletController, LibAppletMode_AllForeground);
if (R_FAILED(rc)) return rc;
libappletArgsCreate(&commonargs, version);

View File

@ -7,7 +7,7 @@ static Result _miiLaShow(const MiiLaAppletInput *in, MiiLaAppletOutput *out) {
AppletHolder holder;
AppletStorage storage;
rc = appletCreateLibraryApplet(&holder, AppletId_miiEdit, LibAppletMode_AllForeground);
rc = appletCreateLibraryApplet(&holder, AppletId_LibraryAppletMiiEdit, LibAppletMode_AllForeground);
if (R_FAILED(rc)) return rc;
if (R_SUCCEEDED(rc)) rc = libappletPushInData(&holder, in, sizeof(*in));

View File

@ -10,7 +10,7 @@ static Result _nfpLaShow(const NfpLaStartParamForAmiiboSettings *param, NfpLaRet
libappletArgsCreate(&commonargs, ver);
rc = libappletLaunch(AppletId_cabinet, &commonargs, param, sizeof(*param), reply, sizeof(*reply), &out_reply_size);
rc = libappletLaunch(AppletId_LibraryAppletCabinet, &commonargs, param, sizeof(*param), reply, sizeof(*reply), &out_reply_size);
if (R_SUCCEEDED(rc)) { // sdknso doesn't validate out_reply_size.
if (!reply->flags) rc = MAKERESULT(Module_Libnx, LibnxError_LibAppletBadExit);
}

View File

@ -13,7 +13,7 @@ static Result _pctlauthShow(PctlAuthArg* arg) {
if (hosversionAtLeast(4,0,0)) ver=2;
libappletArgsCreate(&commonargs, ver);
rc = libappletLaunch(AppletId_auth, &commonargs, arg, sizeof(*arg), &tmpres, sizeof(tmpres), &out_reply_size);
rc = libappletLaunch(AppletId_LibraryAppletAuth, &commonargs, arg, sizeof(*arg), &tmpres, sizeof(tmpres), &out_reply_size);
if (R_SUCCEEDED(rc)) {
if (out_reply_size != sizeof(tmpres)) rc = MAKERESULT(Module_Libnx, LibnxError_LibAppletBadExit);
if (R_SUCCEEDED(rc)) rc = tmpres;

View File

@ -42,7 +42,7 @@ Result pselUiShow(PselUiSettings *ui, AccountUid *out_user) {
arg_size = sizeof(ui->settings);
}
rc = libappletLaunch(AppletId_playerSelect, &args, arg_ptr, arg_size, &ret, sizeof(ret), &reply_size);
rc = libappletLaunch(AppletId_LibraryAppletPlayerSelect, &args, arg_ptr, arg_size, &ret, sizeof(ret), &reply_size);
if (R_SUCCEEDED(rc)) {
rc = ret.res; // Official sw returns this directly.

View File

@ -284,7 +284,7 @@ Result swkbdShow(SwkbdConfig* c, char* out_string, size_t out_string_size) {
if (strbuf) memset(strbuf, 0, strbuf_size+2);
if (R_FAILED(rc)) return rc;
rc = appletCreateLibraryApplet(&holder, AppletId_swkbd, LibAppletMode_AllForeground);
rc = appletCreateLibraryApplet(&holder, AppletId_LibraryAppletSwkbd, LibAppletMode_AllForeground);
if (R_FAILED(rc)) {
free(strbuf);
return rc;
@ -502,7 +502,7 @@ static Result _swkbdInlineLaunch(SwkbdInline* s, SwkbdInitializeArg *initArg) {
memcpy(&s->calcArg.initArg, initArg, sizeof(*initArg));
s->calcArg.flags |= 0x1;
rc = appletCreateLibraryApplet(&s->holder, AppletId_swkbd, s->calcArg.initArg.mode!=SwkbdInlineMode_UserDisplay ? LibAppletMode_Background : LibAppletMode_BackgroundIndirect);
rc = appletCreateLibraryApplet(&s->holder, AppletId_LibraryAppletSwkbd, s->calcArg.initArg.mode!=SwkbdInlineMode_UserDisplay ? LibAppletMode_Background : LibAppletMode_BackgroundIndirect);
if (R_FAILED(rc)) return rc;
if (hosversionAtLeast(10,0,0))

View File

@ -64,7 +64,7 @@ void webWifiCreate(WebWifiConfig* config, const char* conntest_url, const char*
Result webWifiShow(WebWifiConfig* config, WebWifiReturnValue *out) {
AppletHolder holder;
return _webShow(&holder, AppletId_wifiWebAuth, 0, &config->arg, sizeof(config->arg), out, sizeof(*out));
return _webShow(&holder, AppletId_LibraryAppletWifiWebAuth, 0, &config->arg, sizeof(config->arg), out, sizeof(*out));
}
static void _webArgInitialize(WebCommonConfig* config, AppletId appletid, WebShimKind shimKind) {
@ -270,7 +270,7 @@ static Result _webConfigGetU32(WebCommonConfig* config, u16 type, u32 *arg) {
Result webPageCreate(WebCommonConfig* config, const char* url) {
Result rc=0;
_webArgInitialize(config, AppletId_web, WebShimKind_Web);
_webArgInitialize(config, AppletId_LibraryAppletWeb, WebShimKind_Web);
rc = _webConfigSetU8(config, WebArgType_UnknownD, 1);
if (R_SUCCEEDED(rc) && config->version < 0x30000) rc = _webConfigSetU8(config, WebArgType_Unknown12, 1); // Removed from user-process init with [3.0.0+].
@ -282,7 +282,7 @@ Result webPageCreate(WebCommonConfig* config, const char* url) {
Result webNewsCreate(WebCommonConfig* config, const char* url) {
Result rc=0;
_webArgInitialize(config, AppletId_web, WebShimKind_Web);
_webArgInitialize(config, AppletId_LibraryAppletWeb, WebShimKind_Web);
rc = _webConfigSetU8(config, WebArgType_UnknownD, 1);
if (R_SUCCEEDED(rc)) rc = _webConfigSetFlag(config, WebArgType_NewsFlag, true);
@ -298,7 +298,7 @@ Result webYouTubeVideoCreate(WebCommonConfig* config, const char* url) {
Result rc=0;
if (hosversionBefore(5,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
_webArgInitialize(config, AppletId_web, WebShimKind_Web);
_webArgInitialize(config, AppletId_LibraryAppletWeb, WebShimKind_Web);
rc = _webConfigSetU8(config, WebArgType_UnknownD, 1);
if (R_SUCCEEDED(rc)) rc = _webConfigSetFlag(config, WebArgType_YouTubeVideoFlag, true);
@ -315,7 +315,7 @@ Result webOfflineCreate(WebCommonConfig* config, WebDocumentKind docKind, u64 id
if (docKind < WebDocumentKind_OfflineHtmlPage || docKind > WebDocumentKind_SystemDataPage)
return MAKERESULT(Module_Libnx, LibnxError_BadInput);
_webArgInitialize(config, AppletId_offlineWeb, WebShimKind_Offline);
_webArgInitialize(config, AppletId_LibraryAppletOfflineWeb, WebShimKind_Offline);
rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor);
if (R_SUCCEEDED(rc)) rc = _webConfigSetFlag(config, WebArgType_BootAsMediaPlayerInverted, false);
@ -352,7 +352,7 @@ Result webShareCreate(WebCommonConfig* config, WebShareStartPage page) {
Result rc=0;
AccountUid uid={0};
_webArgInitialize(config, AppletId_loginShare, WebShimKind_Share);
_webArgInitialize(config, AppletId_LibraryAppletLoginShare, WebShimKind_Share);
rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor);
if (R_SUCCEEDED(rc)) rc = webConfigSetUid(config, uid);
@ -372,7 +372,7 @@ Result webLobbyCreate(WebCommonConfig* config) {
AccountUid uid={0};
if (hosversionBefore(2,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
_webArgInitialize(config, AppletId_loginShare, WebShimKind_Lobby);
_webArgInitialize(config, AppletId_LibraryAppletLoginShare, WebShimKind_Lobby);
rc = webConfigSetLeftStickMode(config, WebLeftStickMode_Cursor);
if (R_SUCCEEDED(rc) && config->version >= 0x30000) rc = webConfigSetPointer(config, false); // Added to user-process init with [3.0.0+].

View File

@ -65,7 +65,7 @@ static Event g_appletLibraryAppletLaunchableEvent;
static AppletThemeColorType g_appletThemeColorType = AppletThemeColorType_Default;
static ApmCpuBoostMode g_appletCpuBoostMode = ApmCpuBoostMode_Disabled;
static ApmCpuBoostMode g_appletCpuBoostMode = ApmCpuBoostMode_Normal;
static AppletInfo g_appletInfo;
static bool g_appletInfoInitialized;
@ -252,7 +252,7 @@ Result _appletInitialize(void) {
rc = _appletGetCurrentFocusState(&g_appletFocusState);
//Don't enter this msg-loop when g_appletFocusState is already 1, it will hang when applet was previously initialized in the context of the current process for AppletType_Application.
if (R_SUCCEEDED(rc) && g_appletFocusState != AppletFocusState_Focused) {
if (R_SUCCEEDED(rc) && g_appletFocusState != AppletFocusState_InFocus) {
do {
eventWait(&g_appletMessageEvent, UINT64_MAX);
@ -275,7 +275,7 @@ Result _appletInitialize(void) {
if (R_FAILED(rc))
break;
} while(g_appletFocusState != AppletFocusState_Focused);
} while(g_appletFocusState != AppletFocusState_InFocus);
}
if (R_SUCCEEDED(rc))
@ -361,7 +361,7 @@ void _appletCleanup(void) {
if (__nx_applet_type == AppletType_Application) appletSetFocusHandlingMode(AppletFocusHandlingMode_NoSuspend);
if (g_appletCpuBoostMode != ApmCpuBoostMode_Disabled) appletSetCpuBoostMode(ApmCpuBoostMode_Disabled);
if (g_appletCpuBoostMode != ApmCpuBoostMode_Normal) appletSetCpuBoostMode(ApmCpuBoostMode_Normal);
}
if ((envIsNso() && __nx_applet_exit_mode==0) || __nx_applet_exit_mode==1) {
@ -2220,7 +2220,7 @@ Result appletInitializeApplicationCopyrightFrameBuffer(void) {
return rc;
}
Result appletSetApplicationCopyrightImage(const void* buffer, size_t size, s32 x, s32 y, s32 width, s32 height, s32 mode) {
Result appletSetApplicationCopyrightImage(const void* buffer, size_t size, s32 x, s32 y, s32 width, s32 height, AppletWindowOriginMode mode) {
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
if (hosversionBefore(5,0,0))
@ -2990,7 +2990,7 @@ bool appletProcessMessage(u32 msg) {
Result rc=0;
switch(msg) {
case AppletMessage_ExitRequested:
case AppletMessage_ExitRequest:
appletCallHook(AppletHookType_OnExitRequest);
return false;
break;
@ -3003,8 +3003,8 @@ bool appletProcessMessage(u32 msg) {
appletCallHook(AppletHookType_OnFocusState);
break;
case AppletMessage_Restart:
appletCallHook(AppletHookType_OnRestart);
case AppletMessage_Resume:
appletCallHook(AppletHookType_OnResume);
break;
case AppletMessage_OperationModeChanged:
@ -3031,8 +3031,8 @@ bool appletProcessMessage(u32 msg) {
appletCallHook(AppletHookType_OnCaptureButtonShortPressed);
break;
case AppletMessage_AlbumImageTaken:
appletCallHook(AppletHookType_OnAlbumImageTaken);
case AppletMessage_AlbumScreenShotTaken:
appletCallHook(AppletHookType_OnAlbumScreenShotTaken);
break;
}