From 7a952ab39b2a47862c1b230bbccb11f92f8ab804 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 28 Sep 2018 19:48:49 -0700 Subject: [PATCH] hid: Uncomment function that works now --- nx/include/switch/services/hid.h | 2 ++ nx/source/services/hid.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) 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);