commonlibsse_ng\re\b/
BSWin32GamepadDevice.rs1use crate::re::offsets_rtti::RTTI_BSWin32GamepadDevice;
2use crate::re::offsets_vtable::VTABLE_BSWin32GamepadDevice;
3use crate::rel::id::VariantID;
4use windows::Win32::UI::Input::XboxController::XINPUT_STATE;
5
6#[repr(C)]
7#[derive(Debug, PartialEq)]
8pub struct BSWin32GamepadDevice {
9 pub __base: [u8; 0xd8], previousState: XINPUT_STATE, previousLT: f32, previousRT: f32, previousLX: f32, previousLY: f32, previousRX: f32, previousRY: f32, currentState: XINPUT_STATE, currentLT: f32, currentRT: f32, currentLX: f32, currentLY: f32, currentRX: f32, currentRY: f32, }
26const _: () = assert!(core::mem::size_of::<BSWin32GamepadDevice>() == 0x128);
27
28impl BSWin32GamepadDevice {
29 pub const RTTI: VariantID = RTTI_BSWin32GamepadDevice;
31
32 pub const VTABLE: [VariantID; 1] = VTABLE_BSWin32GamepadDevice;
34}
35
36#[commonlibsse_ng_derive_internal::ffi_enum]
38#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
39#[repr(u32)]
40pub enum Key {
41 Up = 0x0001,
42 Down = 0x0002,
43 Left = 0x0004,
44 Right = 0x0008,
45 Start = 0x0010,
46 Back = 0x0020,
47 LeftThumb = 0x0040,
48 RightThumb = 0x0080,
49 LeftShoulder = 0x0100,
50 RightShoulder = 0x0200,
51 A = 0x1000,
52 B = 0x2000,
53 X = 0x4000,
54 Y = 0x8000,
55
56 LeftTrigger = 0x0009,
59 RightTrigger = 0x000A,
60
61 LeftStick = 0x000B,
63 RightStick = 0x000C,
64}
65
66#[commonlibsse_ng_derive_internal::to_bitflags]
67#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
68pub enum ButtonState {
69 up = 0x0001,
70 down = 0x0002,
71 left = 0x0004,
72 right = 0x0008,
73 start = 0x0010,
74 back = 0x0020,
75 leftThumb = 0x0040,
76 rightThumb = 0x0080,
77 leftShoulder = 0x0100,
78 rightShoulder = 0x0200,
80 a = 0x1000,
81 b = 0x2000,
82 x = 0x4000,
83 y = 0x8000,
84}