Add hidGetControllerLayout

This commit is contained in:
shinyquagsire23 2017-11-20 12:29:41 -07:00
parent ffd10708ac
commit aa458e59f9
2 changed files with 5 additions and 0 deletions

View File

@ -504,6 +504,7 @@ Handle hidGetSessionService(void);
void* hidGetSharedmemAddr(void); void* hidGetSharedmemAddr(void);
void hidSetControllerLayout(HIDControllerID id, HIDControllerLayoutType layoutType); void hidSetControllerLayout(HIDControllerID id, HIDControllerLayoutType layoutType);
HIDControllerLayoutType hidGetControllerLayout(HIDControllerID id);
void hidScanInput(void); void hidScanInput(void);
u64 hidKeysHeld(HIDControllerID id); u64 hidKeysHeld(HIDControllerID id);

View File

@ -110,6 +110,10 @@ void hidSetControllerLayout(HIDControllerID id, HIDControllerLayoutType layoutTy
g_controllerLayout[id] = layoutType; g_controllerLayout[id] = layoutType;
} }
HIDControllerLayoutType hidGetControllerLayout(HIDControllerID id) {
return g_controllerLayout[id];
}
void hidScanInput(void) { void hidScanInput(void) {
if (g_hidServiceSession == INVALID_HANDLE) return; if (g_hidServiceSession == INVALID_HANDLE) return;
HIDSharedMemory *sharedMem = (HIDSharedMemory*)hidGetSharedmemAddr(); HIDSharedMemory *sharedMem = (HIDSharedMemory*)hidGetSharedmemAddr();