Moved the applet GetEventHandle code outside of the regularapp block since appletMainLoop() uses this event.

This commit is contained in:
yellows8 2018-02-16 22:54:15 -05:00
parent 3c6b8bb6dd
commit c22655e7a2

View File

@ -157,12 +157,12 @@ Result appletInitialize(void)
if (R_SUCCEEDED(rc))
rc = _appletGetSession(&g_appletProxySession, &g_appletIDebugFunctions, 1000);
if (R_SUCCEEDED(rc) && (__nx_applet_type == AppletType_Application))
{
// ICommonStateGetter::GetEventHandle
if (R_SUCCEEDED(rc))
rc = _appletGetHandle(&g_appletICommonStateGetter, &g_appletMessageEventHandle, 0);
if (R_SUCCEEDED(rc)) {
if (R_SUCCEEDED(rc) && (__nx_applet_type == AppletType_Application))
{
do {
svcWaitSynchronizationSingle(g_appletMessageEventHandle, U64_MAX);
@ -186,7 +186,6 @@ Result appletInitialize(void)
break;
} while(g_appletFocusState!=1);
}
if (R_SUCCEEDED(rc))
rc = _appletAcquireForegroundRights();