From 0c609f91b219579ae15e81b74991d21983639ac7 Mon Sep 17 00:00:00 2001 From: averne Date: Sat, 9 Feb 2019 16:13:51 +0100 Subject: [PATCH] hid: fix official->controller id function --- nx/include/switch/services/hid.h | 4 ++-- nx/source/services/nfc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nx/include/switch/services/hid.h b/nx/include/switch/services/hid.h index 75de6756..56408bec 100644 --- a/nx/include/switch/services/hid.h +++ b/nx/include/switch/services/hid.h @@ -606,8 +606,8 @@ static inline u32 hidControllerIDToOfficial(HidControllerID id) { return 0x10;//For CONTROLLER_UNKNOWN and invalid values return this. } -static inline HidControllerID hidOfficialToControllerID(u64 id) { - if (id < 8) return id; +static inline HidControllerID hidControllerIDFromOfficial(u32 id) { + if (id < 8) return (HidControllerID)id; if (id == 0x20) return CONTROLLER_HANDHELD; return CONTROLLER_UNKNOWN; } diff --git a/nx/source/services/nfc.c b/nx/source/services/nfc.c index 8159fe7f..dcaf2be6 100644 --- a/nx/source/services/nfc.c +++ b/nx/source/services/nfc.c @@ -475,7 +475,7 @@ Result nfpuListDevices(u32 *count, HidControllerID *out, size_t num_elements) { if (R_SUCCEEDED(rc) && out) { for (size_t i=0; i