diff --git a/nx/include/switch/services/hid.h b/nx/include/switch/services/hid.h index 76a34424..16d05998 100644 --- a/nx/include/switch/services/hid.h +++ b/nx/include/switch/services/hid.h @@ -606,6 +606,8 @@ void* hidGetSharedmemAddr(void); void hidSetControllerLayout(HidControllerID id, HidControllerLayoutType layoutType); HidControllerLayoutType hidGetControllerLayout(HidControllerID id); +HidControllerType hidGetControllerType(HidControllerID id); + void hidScanInput(void); u64 hidKeysHeld(HidControllerID id); diff --git a/nx/source/services/hid.c b/nx/source/services/hid.c index 73653129..4ecaf2d5 100644 --- a/nx/source/services/hid.c +++ b/nx/source/services/hid.c @@ -269,8 +269,7 @@ void hidScanInput(void) { rwlockWriteUnlock(&g_hidLock); } -//TODO: Why is this field in sharedmem zeros? -/*u32 hidGetControllerType(HidControllerID id) { +HidControllerType hidGetControllerType(HidControllerID id) { if (id==CONTROLLER_P1_AUTO) return hidGetControllerType(g_controllerP1AutoID); if (id < 0 || id > 9) return 0; @@ -279,7 +278,7 @@ void hidScanInput(void) { rwlockReadUnlock(&g_hidLock); return tmp; -}*/ +} u64 hidKeysHeld(HidControllerID id) { if (id==CONTROLLER_P1_AUTO) return hidKeysHeld(g_controllerP1AutoID);