mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Nv fixes
This commit is contained in:
parent
d6f2e1118c
commit
d22bc791f4
@ -25,10 +25,12 @@ Result nvInitialize(void)
|
||||
atomicIncrement64(&g_refCnt);
|
||||
|
||||
if (serviceIsActive(&g_nvSrv))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_AlreadyInitialized);
|
||||
return 0;
|
||||
|
||||
if (R_FAILED(appletInitialize()))
|
||||
if (R_FAILED(appletInitialize())) {
|
||||
atomicDecrement64(&g_refCnt);
|
||||
return MAKERESULT(Module_Libnx, LibnxError_AppletFailedToInitialize);
|
||||
}
|
||||
|
||||
Result rc = 0;
|
||||
u64 AppletResourceUserId = 0;
|
||||
@ -78,9 +80,9 @@ Result nvInitialize(void)
|
||||
void nvExit(void)
|
||||
{
|
||||
if (atomicDecrement64(&g_refCnt) == 0) {
|
||||
appletExit();
|
||||
serviceClose(&g_nvSrv);
|
||||
tmemClose(&g_nvTransfermem);
|
||||
appletExit();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user