diff options
| author | George Marques | 2017-08-07 00:09:18 -0300 |
|---|---|---|
| committer | George Marques | 2017-08-07 00:09:18 -0300 |
| commit | d9a97aae04b947517c286f019ce7cd8abd3745fe (patch) | |
| tree | 67eb51ea7106ca8f5b241bde0c15386e0f876f81 /platform/uwp/joypad_uwp.h | |
| parent | f89f9f00944d35aad9d2ddb22060bd4dc3c19102 (diff) | |
| download | godot-d9a97aae04b947517c286f019ce7cd8abd3745fe.tar.gz godot-d9a97aae04b947517c286f019ce7cd8abd3745fe.tar.zst godot-d9a97aae04b947517c286f019ce7cd8abd3745fe.zip | |
UWP: Add Gamepad vibration support
Diffstat (limited to '')
| -rw-r--r-- | platform/uwp/joypad_uwp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/uwp/joypad_uwp.h b/platform/uwp/joypad_uwp.h index 7337ffb3c..c55e1e7ab 100644 --- a/platform/uwp/joypad_uwp.h +++ b/platform/uwp/joypad_uwp.h @@ -62,11 +62,17 @@ private: int id; bool connected; ControllerType type; + float ff_timestamp; + float ff_end_timestamp; + bool vibrating; ControllerDevice() { id = -1; connected = false; type = ControllerType::GAMEPAD_CONTROLLER; + ff_timestamp = 0.0f; + ff_end_timestamp = 0.0f; + vibrating = false; } }; @@ -78,6 +84,8 @@ private: void OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value); InputDefault::JoyAxis axis_correct(double p_val, bool p_negate = false, bool p_trigger = false) const; + void joypad_vibration_start(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp); + void joypad_vibration_stop(int p_device, uint64_t p_timestamp); }; #endif |
