diff options
Diffstat (limited to 'src/client/joystick_controller.h')
-rw-r--r-- | src/client/joystick_controller.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/joystick_controller.h b/src/client/joystick_controller.h index ed0ee4068..867a0c3f2 100644 --- a/src/client/joystick_controller.h +++ b/src/client/joystick_controller.h @@ -98,6 +98,9 @@ class JoystickController { public: JoystickController(); + + void onJoystickConnect(const std::vector<irr::SJoystickInfo> &joystick_infos); + bool handleEvent(const irr::SEvent::SJoystickEvent &ev); void clear(); @@ -146,10 +149,14 @@ public: f32 doubling_dtime; private: - const JoystickLayout *m_layout; + void setLayoutFromControllerName(std::string name); + + JoystickLayout m_layout; s16 m_axes_vals[JA_COUNT]; + u8 m_joystick_id; + std::bitset<KeyType::INTERNAL_ENUM_COUNT> m_pressed_keys; f32 m_internal_time; |