From 573442bbebcc6f3f1cccbca89e725420e86612d9 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 11 Dec 2019 19:33:08 -0800 Subject: [PATCH] better var names and add hidGetControllerCount() --- nx/include/switch/services/hid.h | 2 ++ nx/source/services/hid.c | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/nx/include/switch/services/hid.h b/nx/include/switch/services/hid.h index 56c95495..6d65cdd5 100644 --- a/nx/include/switch/services/hid.h +++ b/nx/include/switch/services/hid.h @@ -740,6 +740,8 @@ u64 hidKeysAllHeld(); u64 hidKeysAllDown(); u64 hidKeysAllUp(); +u32 hidGetControllerCount(); + u64 hidMouseButtonsHeld(void); u64 hidMouseButtonsDown(void); u64 hidMouseButtonsUp(void); diff --git a/nx/source/services/hid.c b/nx/source/services/hid.c index a6c7bf6f..cc810af0 100644 --- a/nx/source/services/hid.c +++ b/nx/source/services/hid.c @@ -431,7 +431,7 @@ u64 hidKeysAllDown() { u64 kDown = 0; rwlockReadLock(&g_hidLock); - for (u8 controller=0; controller<10; controller++) { + for (u8 controller=0; controller