mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-06-21 05:12:40 +02:00
Use diagAbortWithResult instead of fatalThrow
This commit is contained in:
parent
fc98393d50
commit
847bb129e9
@ -4,7 +4,7 @@ void userAppInit(void)
|
|||||||
{
|
{
|
||||||
Result res = romfsInit();
|
Result res = romfsInit();
|
||||||
if (R_FAILED(res))
|
if (R_FAILED(res))
|
||||||
fatalThrow(res);
|
diagAbortWithResult(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
void userAppExit(void)
|
void userAppExit(void)
|
||||||
|
@ -15,7 +15,7 @@ extern "C" void userAppInit(void)
|
|||||||
{
|
{
|
||||||
Result res = romfsInit();
|
Result res = romfsInit();
|
||||||
if (R_FAILED(res))
|
if (R_FAILED(res))
|
||||||
fatalThrow(res);
|
diagAbortWithResult(res);
|
||||||
|
|
||||||
#ifdef DEBUG_NXLINK
|
#ifdef DEBUG_NXLINK
|
||||||
socketInitializeDefault();
|
socketInitializeDefault();
|
||||||
|
@ -134,7 +134,7 @@ void userAppInit(void)
|
|||||||
|
|
||||||
rc = plInitialize(PlServiceType_User);
|
rc = plInitialize(PlServiceType_User);
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalThrow(rc);
|
diagAbortWithResult(rc);
|
||||||
|
|
||||||
LanguageCode = getSystemLanguage();
|
LanguageCode = getSystemLanguage();
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ void userAppInit(void)
|
|||||||
|
|
||||||
rc = irsInitialize();
|
rc = irsInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalThrow(rc);
|
diagAbortWithResult(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void userAppExit(void)
|
void userAppExit(void)
|
||||||
|
@ -37,23 +37,23 @@ void __attribute__((weak)) __appInit(void)
|
|||||||
// Initialize default services.
|
// Initialize default services.
|
||||||
rc = smInitialize();
|
rc = smInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalThrow(MAKERESULT(Module_Libnx, LibnxError_InitFail_SM));
|
diagAbortWithResult(MAKERESULT(Module_Libnx, LibnxError_InitFail_SM));
|
||||||
|
|
||||||
// Enable this if you want to use HID.
|
// Enable this if you want to use HID.
|
||||||
/*rc = hidInitialize();
|
/*rc = hidInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalThrow(MAKERESULT(Module_Libnx, LibnxError_InitFail_HID));*/
|
diagAbortWithResult(MAKERESULT(Module_Libnx, LibnxError_InitFail_HID));*/
|
||||||
|
|
||||||
//Enable this if you want to use time.
|
//Enable this if you want to use time.
|
||||||
/*rc = timeInitialize();
|
/*rc = timeInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalThrow(MAKERESULT(Module_Libnx, LibnxError_InitFail_Time));
|
diagAbortWithResult(MAKERESULT(Module_Libnx, LibnxError_InitFail_Time));
|
||||||
|
|
||||||
__libnx_init_time();*/
|
__libnx_init_time();*/
|
||||||
|
|
||||||
rc = fsInitialize();
|
rc = fsInitialize();
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
fatalThrow(MAKERESULT(Module_Libnx, LibnxError_InitFail_FS));
|
diagAbortWithResult(MAKERESULT(Module_Libnx, LibnxError_InitFail_FS));
|
||||||
|
|
||||||
fsdevMountSdmc();
|
fsdevMountSdmc();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user