CommonLibSSE (Parapets fork)
BSGamepadDevice.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSInputDevice.h"
4 #include "RE/B/BSTEvent.h"
5 
6 namespace RE
7 {
8  struct BSGamepadEvent;
9 
11  public BSInputDevice, // 00
12  public BSTEventSource<BSGamepadEvent> // 70
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_BSGamepadDevice;
16 
17  ~BSGamepadDevice() override; // 00
18 
19  // override (BSInputDevice)
20  bool IsEnabled() const override; // 07 - { return connected && userIndex != -1; }
21 
22  // add
23  virtual void SetVibration(float a_largeMotor, float a_smallMotor) = 0; // 09
24  virtual void SetDeviceLight(const std::uint32_t (&a_rgb)[3]); // 0A - { return; }
25  virtual void ResetDeviceLight(); // 0B - { return; }
26  virtual bool IsRemoteController(); // 0C - { return 0; }
27  virtual void NormalizeThumbstickValue(int a_thumbX, int a_thumbY, float& a_xOut, float& a_yOut); // 0D
28  virtual void DoEnableListeningMode(); // 0E - { return; }
29 
30  // members
31  std::int32_t userIndex; // C8
32  bool connected; // CC
33  bool listeningForInput; // CD
34  std::uint16_t padCE; // CE
35  };
36  static_assert(sizeof(BSGamepadDevice) == 0xD0);
37 }
Definition: BSGamepadDevice.h:13
virtual bool IsRemoteController()
bool IsEnabled() const override
virtual void SetVibration(float a_largeMotor, float a_smallMotor)=0
std::uint16_t padCE
Definition: BSGamepadDevice.h:34
bool listeningForInput
Definition: BSGamepadDevice.h:33
std::int32_t userIndex
Definition: BSGamepadDevice.h:31
static constexpr auto RTTI
Definition: BSGamepadDevice.h:15
~BSGamepadDevice() override
virtual void NormalizeThumbstickValue(int a_thumbX, int a_thumbY, float &a_xOut, float &a_yOut)
bool connected
Definition: BSGamepadDevice.h:32
virtual void ResetDeviceLight()
virtual void DoEnableListeningMode()
virtual void SetDeviceLight(const std::uint32_t(&a_rgb)[3])
Definition: BSInputDevice.h:11
Definition: BSTEvent.h:28
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSGamepadDevice
Definition: Offsets_RTTI.h:1718