Re-added g_appletProxySession closing, this was removed by an eariler commit. Renamed APT_BUSY_ERROR to AM_BUSY_ERROR.

This commit is contained in:
yellows8 2018-01-25 00:42:19 -05:00
parent e39dc2baf8
commit 0f8f5e9732

View File

@ -87,7 +87,7 @@ Result appletInitialize(void)
} }
if (R_SUCCEEDED(rc)) { if (R_SUCCEEDED(rc)) {
#define APT_BUSY_ERROR 0x19280 #define AM_BUSY_ERROR 0x19280
do { do {
u32 cmd_id; u32 cmd_id;
@ -104,11 +104,11 @@ Result appletInitialize(void)
rc = _appletGetSessionProxy(&g_appletProxySession, cmd_id, CUR_PROCESS_HANDLE, NULL); rc = _appletGetSessionProxy(&g_appletProxySession, cmd_id, CUR_PROCESS_HANDLE, NULL);
if (rc == APT_BUSY_ERROR) { if (rc == AM_BUSY_ERROR) {
svcSleepThread(10000000); svcSleepThread(10000000);
} }
} while (rc == APT_BUSY_ERROR); } while (rc == AM_BUSY_ERROR);
} }
// Get*Functions, for ILibraryAppletProxy this is GetLibraryAppletSelfAccessor // Get*Functions, for ILibraryAppletProxy this is GetLibraryAppletSelfAccessor
@ -187,7 +187,6 @@ Result appletInitialize(void)
rc = _appletGetOperationMode(&g_appletOperationMode); rc = _appletGetOperationMode(&g_appletOperationMode);
if (R_SUCCEEDED(rc)) if (R_SUCCEEDED(rc))
rc = _appletGetPerformanceMode(&g_appletPerformanceMode); rc = _appletGetPerformanceMode(&g_appletPerformanceMode);
if (R_SUCCEEDED(rc) && __nx_applet_type!=AppletType_Application) if (R_SUCCEEDED(rc) && __nx_applet_type!=AppletType_Application)
rc = _appletGetCurrentFocusState(&g_appletFocusState); rc = _appletGetCurrentFocusState(&g_appletFocusState);
@ -237,6 +236,7 @@ void appletExit(void)
serviceClose(&g_appletIDisplayController); serviceClose(&g_appletIDisplayController);
serviceClose(&g_appletIDebugFunctions); serviceClose(&g_appletIDebugFunctions);
serviceClose(&g_appletProxySession);
serviceClose(&g_appletSrv); serviceClose(&g_appletSrv);
g_appletResourceUserId = 0; g_appletResourceUserId = 0;
} }