From cc08101d5000d7dc5b960cc379605b4526276d5e Mon Sep 17 00:00:00 2001 From: punto- Date: Mon, 20 Apr 2020 03:06:03 -0300 Subject: [PATCH] Input: make VibrationInfo protected to allow implementors to use it (cherry picked from commit 41a7d070957d7cbe24f1f0daa36e7d5f5318c1e5) --- main/input_default.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/main/input_default.h b/main/input_default.h index 02ce5c1e822..16243bbc4a7 100644 --- a/main/input_default.h +++ b/main/input_default.h @@ -65,15 +65,6 @@ class InputDefault : public Input { int mouse_from_touch_index; - struct VibrationInfo { - float weak_magnitude; - float strong_magnitude; - float duration; // Duration in seconds - uint64_t timestamp; - }; - - Map joy_vibration; - struct SpeedTrack { uint64_t last_tick; @@ -186,6 +177,16 @@ private: List > accumulated_events; bool use_accumulated_input; +protected: + struct VibrationInfo { + float weak_magnitude; + float strong_magnitude; + float duration; // Duration in seconds + uint64_t timestamp; + }; + + Map joy_vibration; + public: virtual bool is_key_pressed(int p_scancode) const; virtual bool is_mouse_button_pressed(int p_button) const;