11 #include "games/controllers/ControllerTypes.h" 12 #include "input/joysticks/interfaces/IInputHandler.h" 13 #include "peripherals/PeripheralTypes.h" 47 const std::string& portAddress,
56 std::string ControllerID()
const override;
57 bool HasFeature(
const std::string& feature)
const override;
58 bool AcceptsInput(
const std::string& feature)
const override;
59 bool OnButtonPress(
const std::string& feature,
bool bPressed)
override;
60 void OnButtonHold(
const std::string& feature,
unsigned int holdTimeMs)
override {}
61 bool OnButtonMotion(
const std::string& feature,
63 unsigned int motionTimeMs)
override;
64 bool OnAnalogStickMotion(
const std::string& feature,
67 unsigned int motionTimeMs)
override;
68 bool OnAccelerometerMotion(
const std::string& feature,
float x,
float y,
float z)
override;
69 bool OnWheelMotion(
const std::string& feature,
71 unsigned int motionTimeMs)
override;
72 bool OnThrottleMotion(
const std::string& feature,
74 unsigned int motionTimeMs)
override;
78 const std::string& GetPortAddress()
const {
return m_portAddress; }
80 std::string GetControllerAddress()
const;
81 PERIPHERALS::PeripheralPtr GetSource()
const {
return m_sourcePeripheral; }
82 std::string GetSourceLocation()
const;
83 float GetActivation()
const;
86 void SetSource(PERIPHERALS::PeripheralPtr sourcePeripheral);
90 bool SetRumble(
const std::string& feature,
float magnitude);
95 const std::string m_portAddress;
99 std::unique_ptr<CPortInput> m_portInput;
100 PERIPHERALS::PeripheralPtr m_sourcePeripheral;
void OnButtonHold(const std::string &feature, unsigned int holdTimeMs) override
A digital button has been pressed for more than one event frame.
Definition: GameClientJoystick.h:60
Interface between Kodi and Game add-ons.
Definition: GameClient.h:116
Definition: AudioDecoder.h:18
std::shared_ptr< CController > ControllerPtr
Smart pointer to a game controller (CController)
Definition: ControllerTypes.h:25
Handles game controller events for games.
Definition: GameClientJoystick.h:36
void OnInputFrame() override
Called at the end of the frame that provided input.
Definition: GameClientJoystick.h:75