hid: Various fixes.

This commit is contained in:
yellows8 2020-11-22 19:46:59 -05:00 committed by fincs
parent d28776e4d9
commit 324a835b0c
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60
2 changed files with 13 additions and 13 deletions

View File

@ -247,9 +247,9 @@ typedef enum {
/// HidColorAttribute
typedef enum {
HidColorAttribute_Ok = 0, ///< Ok
HidColorAttribute_ReadError = 1, ///< ReadError
HidColorAttribute_NoController = 2, ///< NoController
HidColorAttribute_Ok = 0, ///< Ok
HidColorAttribute_ReadError = 1, ///< ReadError
HidColorAttribute_NoController = 2, ///< NoController
} HidColorAttribute;
/// HidControllerKeys
@ -328,12 +328,12 @@ typedef enum {
/// HidNpadAttribute
typedef enum {
NpadAttribute_IsConnected = BIT(0), ///< IsConnected
NpadAttribute_IsWired = BIT(1), ///< IsWired
NpadAttribute_IsLeftConnected = BIT(2), ///< IsLeftConnected
NpadAttribute_IsLeftWired = BIT(3), ///< IsLeftWired
NpadAttribute_IsRightConnected = BIT(4), ///< IsRightConnected
NpadAttribute_IsRightWired = BIT(5), ///< IsRightWired
HidNpadAttribute_IsConnected = BIT(0), ///< IsConnected
HidNpadAttribute_IsWired = BIT(1), ///< IsWired
HidNpadAttribute_IsLeftConnected = BIT(2), ///< IsLeftConnected
HidNpadAttribute_IsLeftWired = BIT(3), ///< IsLeftWired
HidNpadAttribute_IsRightConnected = BIT(4), ///< IsRightConnected
HidNpadAttribute_IsRightWired = BIT(5), ///< IsRightWired
} HidNpadAttribute;
/// HidSixAxisSensorAttribute
@ -464,7 +464,7 @@ typedef enum {
HidAppletFooterUiType_LarkNesLeft = 17, ///< LarkNesLeft
HidAppletFooterUiType_LarkNesRight = 18, ///< LarkNesRight
HidAppletFooterUiType_Lucia = 19, ///< Lucia
HidAppletFooterUiType_Verification = 20 , ///< Verification
HidAppletFooterUiType_Verification = 20, ///< Verification
} HidAppletFooterUiType;
/// NpadInterfaceType
@ -722,7 +722,7 @@ typedef struct HidNpadHandheldLarkState {
JoystickPosition joysticks[JOYSTICK_NUM_STICKS];
u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
HidNpadLarkType lark_type_l_and_main; ///< \ref HidNpadLarkType LarkTypeLAndMain
u32 lark_type_r; ///< \ref HidNpadLarkType LarkTypeR
HidNpadLarkType lark_type_r; ///< \ref HidNpadLarkType LarkTypeR
u32 pad;
} HidNpadHandheldLarkState;

View File

@ -258,7 +258,7 @@ void hidScanInput(void) {
}
g_controllerP1AutoID = CONTROLLER_HANDHELD;
if (g_controllerEntries[CONTROLLER_PLAYER_1].attributes & NpadAttribute_IsConnected)
if (g_controllerEntries[CONTROLLER_PLAYER_1].attributes & HidNpadAttribute_IsConnected)
g_controllerP1AutoID = CONTROLLER_PLAYER_1;
rwlockWriteUnlock(&g_hidLock);
@ -706,7 +706,7 @@ bool hidIsControllerConnected(HidControllerID id) {
if (id < 0 || id > 9) return 0;
rwlockReadLock(&g_hidLock);
bool flag = (g_controllerEntries[id].attributes & NpadAttribute_IsConnected) != 0;
bool flag = (g_controllerEntries[id].attributes & HidNpadAttribute_IsConnected) != 0;
rwlockReadUnlock(&g_hidLock);
return flag;
}