wiah
This commit is contained in:
Julia 2024-04-11 00:17:14 -05:00
parent ca32c2ce76
commit 878fbdd934

View file

@ -19,36 +19,35 @@ enum InputType {
ESCAPE ESCAPE
}; };
struct Button { struct Input {
u64 value;
} but;
struct Axis {
i64 value;
} axis;
struct Joystick {
i32 x;
i32 y;
} js;
struct InputRecord {
u16f bind;
u8 type; u8 type;
u8 is_down; u8 is_down;
u8 is_held; u8 is_held;
u8 is_up; u8 is_up;
union { union {
struct Button but; struct Button {
struct Axis axis; u64 value;
struct Joystick js; } but;
struct Axis {
i64 value;
} axis;
struct Joystick {
i32 x;
i32 y;
} js;
}; };
};
struct InputRecord {
u16f bind;
struct Input dat;
struct timespec timestamp; struct timespec timestamp;
}; };
struct InputAxis { struct InputAxis {
struct input; struct Input dat;
struct timespec last_pressed; struct timespec last_pressed;
struct timespec last_released; struct timespec last_released;