diff options
Diffstat (limited to 'platform/android/display_server_android.h')
-rw-r--r-- | platform/android/display_server_android.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/platform/android/display_server_android.h b/platform/android/display_server_android.h index aa5a2c1185..f1f1a6a278 100644 --- a/platform/android/display_server_android.h +++ b/platform/android/display_server_android.h @@ -41,7 +41,7 @@ class RenderingDeviceVulkan; class DisplayServerAndroid : public DisplayServer { public: struct TouchPos { - int id; + int id = 0; Point2 pos; }; @@ -52,12 +52,12 @@ public: }; struct JoypadEvent { - int device; - int type; - int index; - bool pressed; - float value; - int hat; + int device = 0; + int type = 0; + int index = 0; + bool pressed = false; + float value = 0; + int hat = 0; }; private: @@ -70,6 +70,8 @@ private: int buttons_state; + MouseMode mouse_mode; + bool keep_screen_on; Vector<TouchPos> touch; @@ -172,12 +174,15 @@ public: void process_gyroscope(const Vector3 &p_gyroscope); void process_touch(int p_event, int p_pointer, const Vector<TouchPos> &p_points); void process_hover(int p_type, Point2 p_pos); - void process_mouse_event(int event_action, int event_android_buttons_mask, Point2 event_pos, float event_vertical_factor = 0, float event_horizontal_factor = 0); + void process_mouse_event(int input_device, int event_action, int event_android_buttons_mask, Point2 event_pos, float event_vertical_factor = 0, float event_horizontal_factor = 0); void process_double_tap(int event_android_button_mask, Point2 p_pos); void process_scroll(Point2 p_pos); void process_joy_event(JoypadEvent p_event); void process_key_event(int p_keycode, int p_scancode, int p_unicode_char, bool p_pressed); + void mouse_set_mode(MouseMode p_mode); + MouseMode mouse_get_mode() const; + static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error); static Vector<String> get_rendering_drivers_func(); static void register_android_driver(); |