CommonLibSSE NG
Loading...
Searching...
No Matches
XInputAPI.h
Go to the documentation of this file.
1
#pragma once
2
3
// TODO: This should probably be behind some sort of pragma that allows linking with xinput
4
namespace
RE::XInput
5
{
6
struct
__XINPUT_GAMEPAD
7
{
8
std::uint16_t
wButtons
;
9
std::byte
bLeftTrigger
;
10
std::byte
bRightTrigger
;
11
std::int16_t
sThumbLX
;
12
std::int16_t
sThumbLY
;
13
std::int16_t
sThumbRX
;
14
std::int16_t
sThumbRY
;
15
};
16
using
XINPUT_GAMEPAD
=
__XINPUT_GAMEPAD
;
17
struct
__XINPUT_STATE
18
{
19
std::uint32_t
dwPacketNumber
;
20
__XINPUT_GAMEPAD
Gamepad
;
21
};
22
using
XINPUT_STATE
=
__XINPUT_STATE
;
23
struct
__XINPUT_KEYSTROKE
24
{
25
std::uint16_t
VirtualKey
;
26
std::uint16_t
Unicode
;
27
std::uint16_t
Flags
;
28
std::uint8_t
UserIndex
;
29
std::uint8_t
HidCode
;
30
};
31
using
XINPUT_KEYSTROKE
=
__XINPUT_KEYSTROKE
;
32
struct
__XINPUT_VIBRATION
33
{
34
std::uint16_t
wLeftMotorSpeed
;
35
std::uint16_t
wRightMotorSpeed
;
36
};
37
using
XINPUT_VIBRATION
=
__XINPUT_VIBRATION
;
38
39
struct
__XINPUT_CAPABILITIES
40
{
41
std::uint8_t
Type
;
42
std::uint8_t
SubType
;
43
std::uint16_t
Flags
;
44
XINPUT_GAMEPAD
Gamepad
;
45
XINPUT_VIBRATION
Vibration
;
46
};
47
using
XINPUT_CAPABILITIES
=
__XINPUT_CAPABILITIES
;
48
49
enum
XInputButton
: std::uint16_t
50
{
51
XINPUT_GAMEPAD_DPAD_UP
= 0x0001,
52
XINPUT_GAMEPAD_DPAD_DOWN
= 0x0002,
53
XINPUT_GAMEPAD_DPAD_LEFT
= 0x0004,
54
XINPUT_GAMEPAD_DPAD_RIGHT
= 0x0008,
55
XINPUT_GAMEPAD_START
= 0x0010,
56
XINPUT_GAMEPAD_BACK
= 0x0020,
57
XINPUT_GAMEPAD_LEFT_THUMB
= 0x0040,
58
XINPUT_GAMEPAD_RIGHT_THUMB
= 0x0080,
59
XINPUT_GAMEPAD_LEFT_SHOULDER
= 0x0100,
60
XINPUT_GAMEPAD_RIGHT_SHOULDER
= 0x0200,
61
XINPUT_GAMEPAD_A
= 0x1000,
62
XINPUT_GAMEPAD_B
= 0x2000,
63
XINPUT_GAMEPAD_X
= 0x4000,
64
XINPUT_GAMEPAD_Y
= 0x8000
65
};
66
static
constexpr
std::uint16_t
XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE
= 7849;
67
static
constexpr
std::uint16_t
XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE
= 8689;
68
static
constexpr
std::uint8_t
XINPUT_GAMEPAD_TRIGGER_THRESHOLD
= 30;
69
70
static
constexpr
std::uint16_t
XINPUT_BUTTON_MASK
=
XINPUT_GAMEPAD_DPAD_UP
|
71
XINPUT_GAMEPAD_DPAD_DOWN
|
72
XINPUT_GAMEPAD_DPAD_LEFT
|
73
XINPUT_GAMEPAD_DPAD_RIGHT
|
74
XINPUT_GAMEPAD_START
|
75
XINPUT_GAMEPAD_BACK
|
76
XINPUT_GAMEPAD_LEFT_THUMB
|
77
XINPUT_GAMEPAD_RIGHT_THUMB
|
78
XINPUT_GAMEPAD_LEFT_SHOULDER
|
79
XINPUT_GAMEPAD_RIGHT_SHOULDER
|
80
XINPUT_GAMEPAD_A
|
81
XINPUT_GAMEPAD_B
|
82
XINPUT_GAMEPAD_X
|
83
XINPUT_GAMEPAD_Y
;
84
}
RE::XInput
Definition
XInputAPI.h:5
RE::XInput::XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE
static constexpr std::uint16_t XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE
Definition
XInputAPI.h:67
RE::XInput::XINPUT_BUTTON_MASK
static constexpr std::uint16_t XINPUT_BUTTON_MASK
Definition
XInputAPI.h:70
RE::XInput::XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE
static constexpr std::uint16_t XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE
Definition
XInputAPI.h:66
RE::XInput::XINPUT_GAMEPAD_TRIGGER_THRESHOLD
static constexpr std::uint8_t XINPUT_GAMEPAD_TRIGGER_THRESHOLD
Definition
XInputAPI.h:68
RE::XInput::XInputButton
XInputButton
Definition
XInputAPI.h:50
RE::XInput::XINPUT_GAMEPAD_X
@ XINPUT_GAMEPAD_X
Definition
XInputAPI.h:63
RE::XInput::XINPUT_GAMEPAD_START
@ XINPUT_GAMEPAD_START
Definition
XInputAPI.h:55
RE::XInput::XINPUT_GAMEPAD_DPAD_LEFT
@ XINPUT_GAMEPAD_DPAD_LEFT
Definition
XInputAPI.h:53
RE::XInput::XINPUT_GAMEPAD_Y
@ XINPUT_GAMEPAD_Y
Definition
XInputAPI.h:64
RE::XInput::XINPUT_GAMEPAD_DPAD_DOWN
@ XINPUT_GAMEPAD_DPAD_DOWN
Definition
XInputAPI.h:52
RE::XInput::XINPUT_GAMEPAD_LEFT_THUMB
@ XINPUT_GAMEPAD_LEFT_THUMB
Definition
XInputAPI.h:57
RE::XInput::XINPUT_GAMEPAD_BACK
@ XINPUT_GAMEPAD_BACK
Definition
XInputAPI.h:56
RE::XInput::XINPUT_GAMEPAD_LEFT_SHOULDER
@ XINPUT_GAMEPAD_LEFT_SHOULDER
Definition
XInputAPI.h:59
RE::XInput::XINPUT_GAMEPAD_DPAD_UP
@ XINPUT_GAMEPAD_DPAD_UP
Definition
XInputAPI.h:51
RE::XInput::XINPUT_GAMEPAD_DPAD_RIGHT
@ XINPUT_GAMEPAD_DPAD_RIGHT
Definition
XInputAPI.h:54
RE::XInput::XINPUT_GAMEPAD_RIGHT_SHOULDER
@ XINPUT_GAMEPAD_RIGHT_SHOULDER
Definition
XInputAPI.h:60
RE::XInput::XINPUT_GAMEPAD_RIGHT_THUMB
@ XINPUT_GAMEPAD_RIGHT_THUMB
Definition
XInputAPI.h:58
RE::XInput::XINPUT_GAMEPAD_A
@ XINPUT_GAMEPAD_A
Definition
XInputAPI.h:61
RE::XInput::XINPUT_GAMEPAD_B
@ XINPUT_GAMEPAD_B
Definition
XInputAPI.h:62
RE::XInput::__XINPUT_CAPABILITIES
Definition
XInputAPI.h:40
RE::XInput::__XINPUT_CAPABILITIES::SubType
std::uint8_t SubType
Definition
XInputAPI.h:42
RE::XInput::__XINPUT_CAPABILITIES::Type
std::uint8_t Type
Definition
XInputAPI.h:41
RE::XInput::__XINPUT_CAPABILITIES::Gamepad
XINPUT_GAMEPAD Gamepad
Definition
XInputAPI.h:44
RE::XInput::__XINPUT_CAPABILITIES::Flags
std::uint16_t Flags
Definition
XInputAPI.h:43
RE::XInput::__XINPUT_CAPABILITIES::Vibration
XINPUT_VIBRATION Vibration
Definition
XInputAPI.h:45
RE::XInput::__XINPUT_GAMEPAD
Definition
XInputAPI.h:7
RE::XInput::__XINPUT_GAMEPAD::sThumbRY
std::int16_t sThumbRY
Definition
XInputAPI.h:14
RE::XInput::__XINPUT_GAMEPAD::bLeftTrigger
std::byte bLeftTrigger
Definition
XInputAPI.h:9
RE::XInput::__XINPUT_GAMEPAD::sThumbLY
std::int16_t sThumbLY
Definition
XInputAPI.h:12
RE::XInput::__XINPUT_GAMEPAD::sThumbRX
std::int16_t sThumbRX
Definition
XInputAPI.h:13
RE::XInput::__XINPUT_GAMEPAD::bRightTrigger
std::byte bRightTrigger
Definition
XInputAPI.h:10
RE::XInput::__XINPUT_GAMEPAD::sThumbLX
std::int16_t sThumbLX
Definition
XInputAPI.h:11
RE::XInput::__XINPUT_GAMEPAD::wButtons
std::uint16_t wButtons
Definition
XInputAPI.h:8
RE::XInput::__XINPUT_KEYSTROKE
Definition
XInputAPI.h:24
RE::XInput::__XINPUT_KEYSTROKE::Unicode
std::uint16_t Unicode
Definition
XInputAPI.h:26
RE::XInput::__XINPUT_KEYSTROKE::Flags
std::uint16_t Flags
Definition
XInputAPI.h:27
RE::XInput::__XINPUT_KEYSTROKE::VirtualKey
std::uint16_t VirtualKey
Definition
XInputAPI.h:25
RE::XInput::__XINPUT_KEYSTROKE::HidCode
std::uint8_t HidCode
Definition
XInputAPI.h:29
RE::XInput::__XINPUT_KEYSTROKE::UserIndex
std::uint8_t UserIndex
Definition
XInputAPI.h:28
RE::XInput::__XINPUT_STATE
Definition
XInputAPI.h:18
RE::XInput::__XINPUT_STATE::Gamepad
__XINPUT_GAMEPAD Gamepad
Definition
XInputAPI.h:20
RE::XInput::__XINPUT_STATE::dwPacketNumber
std::uint32_t dwPacketNumber
Definition
XInputAPI.h:19
RE::XInput::__XINPUT_VIBRATION
Definition
XInputAPI.h:33
RE::XInput::__XINPUT_VIBRATION::wLeftMotorSpeed
std::uint16_t wLeftMotorSpeed
Definition
XInputAPI.h:34
RE::XInput::__XINPUT_VIBRATION::wRightMotorSpeed
std::uint16_t wRightMotorSpeed
Definition
XInputAPI.h:35
CommonLibSSE-NG
include
SKSE
Impl
XInputAPI.h
Generated by
1.9.7