Input: make VibrationInfo protected to allow implementors to use it

(cherry picked from commit 41a7d07095)
This commit is contained in:
punto- 2020-04-20 03:06:03 -03:00 committed by Rémi Verschelde
parent ee8b3bef2d
commit cc08101d50
1 changed files with 10 additions and 9 deletions

View File

@ -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<int, VibrationInfo> joy_vibration;
struct SpeedTrack {
uint64_t last_tick;
@ -186,6 +177,16 @@ private:
List<Ref<InputEvent> > accumulated_events;
bool use_accumulated_input;
protected:
struct VibrationInfo {
float weak_magnitude;
float strong_magnitude;
float duration; // Duration in seconds
uint64_t timestamp;
};
Map<int, VibrationInfo> joy_vibration;
public:
virtual bool is_key_pressed(int p_scancode) const;
virtual bool is_mouse_button_pressed(int p_button) const;