Fix the order in which the Service Handles are requested
This commit is contained in:
parent
0ba6ea4005
commit
205c2107f0
@ -93,6 +93,8 @@ Result frdInit(void);
|
|||||||
/// Exists FRD.
|
/// Exists FRD.
|
||||||
void frdExit(void);
|
void frdExit(void);
|
||||||
|
|
||||||
|
/// Get FRD handle.
|
||||||
|
Handle *frdSessionGetHandle(void);
|
||||||
/**
|
/**
|
||||||
* @brief Gets the login status of the current user.
|
* @brief Gets the login status of the current user.
|
||||||
* @param state Pointer to write the current user's login status to.
|
* @param state Pointer to write the current user's login status to.
|
||||||
|
@ -46,9 +46,9 @@ Result frdInit(void)
|
|||||||
|
|
||||||
if (AtomicPostIncrement(&frdRefCount)) return 0;
|
if (AtomicPostIncrement(&frdRefCount)) return 0;
|
||||||
|
|
||||||
ret = srvGetServiceHandle(&frdHandle, "frd:u");
|
ret = srvGetServiceHandle(&frdHandle, "frd:a");
|
||||||
if (R_FAILED(ret)) ret = srvGetServiceHandle(&frdHandle, "frd:n");
|
if (R_FAILED(ret)) ret = srvGetServiceHandle(&frdHandle, "frd:n");
|
||||||
if (R_FAILED(ret)) ret = srvGetServiceHandle(&frdHandle, "frd:a");
|
if (R_FAILED(ret)) ret = srvGetServiceHandle(&frdHandle, "frd:u");
|
||||||
if (R_FAILED(ret)) AtomicDecrement(&frdRefCount);
|
if (R_FAILED(ret)) AtomicDecrement(&frdRefCount);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -60,6 +60,11 @@ void frdExit(void)
|
|||||||
svcCloseHandle(frdHandle);
|
svcCloseHandle(frdHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Handle *frdGetSessionHandle(void)
|
||||||
|
{
|
||||||
|
return &frdHandle;
|
||||||
|
}
|
||||||
|
|
||||||
Result FRDU_HasLoggedIn(bool *state)
|
Result FRDU_HasLoggedIn(bool *state)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user