mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 10:52:15 +02:00
Change initialization mode
This commit is contained in:
parent
d8c631b65c
commit
9fd18f4d02
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user