mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 02:22:15 +02:00
Let nv reference applet
This commit is contained in:
parent
12e1d92412
commit
a4e427823e
@ -72,6 +72,7 @@ enum {
|
||||
LibnxError_IncompatSysVer,
|
||||
LibnxError_InitFail_Time,
|
||||
LibnxError_TooManyDevOpTabs,
|
||||
LibnxError_AppletFailedToInitialize,
|
||||
};
|
||||
|
||||
/// libnx nvidia error codes
|
||||
|
@ -20,6 +20,9 @@ Result nvInitialize(size_t transfermem_size)
|
||||
if (serviceIsActive(&g_nvSrv))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_AlreadyInitialized);
|
||||
|
||||
if (R_FAILED(appletInitialize()))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_AppletFailedToInitialize);
|
||||
|
||||
Result rc = 0;
|
||||
u64 AppletResourceUserId = 0;
|
||||
|
||||
@ -59,6 +62,7 @@ Result nvInitialize(size_t transfermem_size)
|
||||
}
|
||||
|
||||
if (R_FAILED(rc)) {
|
||||
appletExit();
|
||||
nvExit();
|
||||
}
|
||||
|
||||
@ -67,6 +71,7 @@ Result nvInitialize(size_t transfermem_size)
|
||||
|
||||
void nvExit(void)
|
||||
{
|
||||
appletExit();
|
||||
serviceClose(&g_nvSrv);
|
||||
tmemClose(&g_nvTransfermem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user