mirror of
https://github.com/switchbrew/libnx.git
synced 2025-08-05 16:09:24 +02:00
Let nv reference applet
This commit is contained in:
parent
efacee6956
commit
194e335532
@ -74,6 +74,7 @@ enum {
|
||||
LibnxError_TooManyDevOpTabs,
|
||||
LibnxError_DomainMessageUnknownType,
|
||||
LibnxError_DomainMessageTooManyObjectIds,
|
||||
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