From 9fd18f4d02761d6f88624a92027798013450d581 Mon Sep 17 00:00:00 2001 From: exelix Date: Sun, 3 Mar 2019 18:39:21 +0100 Subject: [PATCH] Change initialization mode --- nx/source/services/nifm.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/nx/source/services/nifm.c b/nx/source/services/nifm.c index 4a895039..293ec002 100644 --- a/nx/source/services/nifm.c +++ b/nx/source/services/nifm.c @@ -23,27 +23,14 @@ Result nifmInitialize(void) { if (serviceIsActive(&g_nifmSrv)) return 0; - Result rc; + Result rc = smGetService(&g_nifmSrv, "nifm:s"); - switch (appletGetAppletType()) { - case AppletType_None: - rc = smGetService(&g_nifmSrv, "nifm:s"); - break; - - case AppletType_Default: - case AppletType_Application: - case AppletType_SystemApplication: - default: - rc = smGetService(&g_nifmSrv, "nifm:u"); - break; - - case AppletType_SystemApplet: - case AppletType_LibraryApplet: - case AppletType_OverlayApplet: + if (R_FAILED(rc)) rc = smGetService(&g_nifmSrv, "nifm:a"); - break; - } - + + if (R_FAILED(rc)) + rc = smGetService(&g_nifmSrv, "nifm:u"); + if (R_SUCCEEDED(rc)) rc = serviceConvertToDomain(&g_nifmSrv); if (R_SUCCEEDED(rc)) {