mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Fix nfc:user command ids
This commit is contained in:
parent
bc5d01400f
commit
2b84eaeaed
@ -65,7 +65,7 @@ Result nfpuInitialize(const NfpuInitConfig *config) {
|
|||||||
rc = _nfpuCreateInterface(&g_nfcuSrv, &g_nfcuInterface);
|
rc = _nfpuCreateInterface(&g_nfcuSrv, &g_nfcuInterface);
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc))
|
if (R_SUCCEEDED(rc))
|
||||||
rc = _nfpuInterfaceInitialize(&g_nfcuInterface, hosversionAtLeast(4,0,0) ? 0 : 400, aruid, config);
|
rc = _nfpuInterfaceInitialize(&g_nfcuInterface, hosversionBefore(4,0,0) ? 0 : 400, aruid, config);
|
||||||
|
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
nfpuExit();
|
nfpuExit();
|
||||||
@ -76,7 +76,7 @@ Result nfpuInitialize(const NfpuInitConfig *config) {
|
|||||||
void nfpuExit(void) {
|
void nfpuExit(void) {
|
||||||
if (atomicDecrement64(&g_refCnt) == 0) {
|
if (atomicDecrement64(&g_refCnt) == 0) {
|
||||||
_nfpuInterfaceFinalize(&g_nfpuInterface, 1);
|
_nfpuInterfaceFinalize(&g_nfpuInterface, 1);
|
||||||
_nfpuInterfaceFinalize(&g_nfcuInterface, hosversionAtLeast(4,0,0) ? 1 : 401);
|
_nfpuInterfaceFinalize(&g_nfcuInterface, hosversionBefore(4,0,0) ? 1 : 401);
|
||||||
serviceClose(&g_nfpuInterface);
|
serviceClose(&g_nfpuInterface);
|
||||||
serviceClose(&g_nfcuInterface);
|
serviceClose(&g_nfcuInterface);
|
||||||
serviceClose(&g_nfpuSrv);
|
serviceClose(&g_nfpuSrv);
|
||||||
@ -747,7 +747,7 @@ Result nfpuIsNfcEnabled(bool *out) {
|
|||||||
raw = serviceIpcPrepareHeader(&g_nfcuInterface, &c, sizeof(*raw));
|
raw = serviceIpcPrepareHeader(&g_nfcuInterface, &c, sizeof(*raw));
|
||||||
|
|
||||||
raw->magic = SFCI_MAGIC;
|
raw->magic = SFCI_MAGIC;
|
||||||
raw->cmd_id = hosversionAtLeast(2,0,0) ? 3 : 403;
|
raw->cmd_id = hosversionBefore(4,0,0) ? 3 : 403;
|
||||||
|
|
||||||
Result rc = serviceIpcDispatch(&g_nfcuInterface);
|
Result rc = serviceIpcDispatch(&g_nfcuInterface);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user