diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-17 14:46:39 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-17 14:46:39 +0200 |
commit | 4b2fb36a04ee71f6b105e776135bdb7dea300de8 (patch) | |
tree | 36a083eae9e149123175fc8da429d9e62a786aea /platform/android/android_input_handler.cpp | |
parent | 61df1deb61b97028087dcbca8e68c82d0756d5f1 (diff) | |
parent | 7494ad6b5444f8dffeb2c2cefaad2b2759f7ce96 (diff) | |
download | redot-engine-4b2fb36a04ee71f6b105e776135bdb7dea300de8.tar.gz |
Merge pull request #80644 from Distantz/master
Android Stylus pressure and tilt support.
Diffstat (limited to 'platform/android/android_input_handler.cpp')
-rw-r--r-- | platform/android/android_input_handler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/android_input_handler.cpp b/platform/android/android_input_handler.cpp index f6a0776017..bd194478d9 100644 --- a/platform/android/android_input_handler.cpp +++ b/platform/android/android_input_handler.cpp @@ -292,7 +292,7 @@ void AndroidInputHandler::_release_mouse_event_info(bool p_source_mouse_relative mouse_event_info.valid = false; } -void AndroidInputHandler::process_mouse_event(int p_event_action, int p_event_android_buttons_mask, Point2 p_event_pos, Vector2 p_delta, bool p_double_click, bool p_source_mouse_relative) { +void AndroidInputHandler::process_mouse_event(int p_event_action, int p_event_android_buttons_mask, Point2 p_event_pos, Vector2 p_delta, bool p_double_click, bool p_source_mouse_relative, float p_pressure, Vector2 p_tilt) { BitField<MouseButtonMask> event_buttons_mask = _android_button_mask_to_godot_button_mask(p_event_android_buttons_mask); switch (p_event_action) { case AMOTION_EVENT_ACTION_HOVER_MOVE: // hover move @@ -349,6 +349,8 @@ void AndroidInputHandler::process_mouse_event(int p_event_action, int p_event_an hover_prev_pos = p_event_pos; } ev->set_button_mask(event_buttons_mask); + ev->set_pressure(p_pressure); + ev->set_tilt(p_tilt); Input::get_singleton()->parse_input_event(ev); } break; |