mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
nfc: Replaced the handle within NfcDeviceHandle with an u8-array. Removed PACKED from the nfpCreateApplicationArea in-struct. Improved bool handling.
This commit is contained in:
parent
5700b8f347
commit
04179b286d
@ -144,7 +144,7 @@ typedef struct {
|
||||
|
||||
/// Nfc/Nfp DeviceHandle
|
||||
typedef struct {
|
||||
u64 handle; ///< Handle.
|
||||
u8 handle[0x8]; ///< Handle.
|
||||
} NfcDeviceHandle;
|
||||
|
||||
/**
|
||||
|
@ -189,7 +189,7 @@ static Result _nfcCmdNoInOutU8(Service* srv, u8 *out, u32 cmd_id) {
|
||||
static Result _nfcCmdNoInOutBool(Service* srv, bool *out, u32 cmd_id) {
|
||||
u8 tmp=0;
|
||||
Result rc = _nfcCmdNoInOutU8(srv, &tmp, cmd_id);
|
||||
if (R_SUCCEEDED(rc) && out) *out = tmp!=0;
|
||||
if (R_SUCCEEDED(rc) && out) *out = tmp & 1;
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ Result nfpCreateApplicationArea(const NfcDeviceHandle *handle, u32 app_id, const
|
||||
const struct {
|
||||
NfcDeviceHandle handle;
|
||||
u32 app_id;
|
||||
} PACKED in = { *handle, app_id };
|
||||
} in = { *handle, app_id };
|
||||
|
||||
serviceAssumeDomain(&g_nfpInterface);
|
||||
return serviceDispatchIn(&g_nfpInterface, 12, in,
|
||||
|
Loading…
Reference in New Issue
Block a user