mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-27 15:22:40 +02:00
hid: circlePosition -> joystickPosition
This commit is contained in:
parent
a4dbd93b1f
commit
52e928df0e
@ -313,11 +313,11 @@ typedef struct touchPosition
|
|||||||
u32 angle;
|
u32 angle;
|
||||||
} touchPosition;
|
} touchPosition;
|
||||||
|
|
||||||
typedef struct circlePosition
|
typedef struct joystickPosition
|
||||||
{
|
{
|
||||||
s32 dx;
|
s32 dx;
|
||||||
s32 dy;
|
s32 dy;
|
||||||
} circlePosition;
|
} joystickPosition;
|
||||||
|
|
||||||
#define JOYSTICK_MAX (0x8000)
|
#define JOYSTICK_MAX (0x8000)
|
||||||
#define JOYSTICK_MIN (-0x8000)
|
#define JOYSTICK_MIN (-0x8000)
|
||||||
@ -480,7 +480,7 @@ typedef struct HidControllerInputEntry
|
|||||||
u64 timestamp;
|
u64 timestamp;
|
||||||
u64 timestamp_2;
|
u64 timestamp_2;
|
||||||
u64 buttons;
|
u64 buttons;
|
||||||
circlePosition joysticks[JOYSTICK_NUM_STICKS];
|
joystickPosition joysticks[JOYSTICK_NUM_STICKS];
|
||||||
u64 connectionState;
|
u64 connectionState;
|
||||||
} HidControllerInputEntry;
|
} HidControllerInputEntry;
|
||||||
static_assert(sizeof(HidControllerInputEntry) == 0x30, "Hid controller input entry structure has incorrect size");
|
static_assert(sizeof(HidControllerInputEntry) == 0x30, "Hid controller input entry structure has incorrect size");
|
||||||
@ -555,4 +555,4 @@ bool hidKeyboardUp(HidKeyboardScancode key);
|
|||||||
u32 hidTouchCount(void);
|
u32 hidTouchCount(void);
|
||||||
void hidTouchRead(touchPosition *pos, u32 point_id);
|
void hidTouchRead(touchPosition *pos, u32 point_id);
|
||||||
|
|
||||||
void hidJoystickRead(circlePosition *pos, HidControllerID id, HidControllerJoystick stick);
|
void hidJoystickRead(joystickPosition *pos, HidControllerID id, HidControllerJoystick stick);
|
||||||
|
@ -327,7 +327,7 @@ void hidTouchRead(touchPosition *pos, u32 point_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void hidJoystickRead(circlePosition *pos, HidControllerID id, HidControllerJoystick stick) {
|
void hidJoystickRead(joystickPosition *pos, HidControllerID id, HidControllerJoystick stick) {
|
||||||
if (id == CONTROLLER_P1_AUTO) return hidJoystickRead(pos, g_controllerP1AutoID, stick);
|
if (id == CONTROLLER_P1_AUTO) return hidJoystickRead(pos, g_controllerP1AutoID, stick);
|
||||||
|
|
||||||
if (pos) {
|
if (pos) {
|
||||||
|
Loading…
Reference in New Issue
Block a user