diff --git a/nx/include/switch/services/hid.h b/nx/include/switch/services/hid.h index d40c89f4..3ac69508 100644 --- a/nx/include/switch/services/hid.h +++ b/nx/include/switch/services/hid.h @@ -504,6 +504,7 @@ Handle hidGetSessionService(void); void* hidGetSharedmemAddr(void); void hidSetControllerLayout(HIDControllerID id, HIDControllerLayoutType layoutType); +HIDControllerLayoutType hidGetControllerLayout(HIDControllerID id); void hidScanInput(void); u64 hidKeysHeld(HIDControllerID id); diff --git a/nx/source/services/hid.c b/nx/source/services/hid.c index b6a0f0ec..69954ace 100644 --- a/nx/source/services/hid.c +++ b/nx/source/services/hid.c @@ -110,6 +110,10 @@ void hidSetControllerLayout(HIDControllerID id, HIDControllerLayoutType layoutTy g_controllerLayout[id] = layoutType; } +HIDControllerLayoutType hidGetControllerLayout(HIDControllerID id) { + return g_controllerLayout[id]; +} + void hidScanInput(void) { if (g_hidServiceSession == INVALID_HANDLE) return; HIDSharedMemory *sharedMem = (HIDSharedMemory*)hidGetSharedmemAddr();