You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Wayland: switch pointer position handling to doubles
This reduces even further the amount of work we have to do when scaling and potentially improves input accuracy as now the input code is free from any form of rounding.
This commit is contained in:
@@ -295,7 +295,7 @@ public:
|
||||
};
|
||||
|
||||
struct PointerData {
|
||||
Point2i position;
|
||||
Point2 position;
|
||||
uint32_t motion_time = 0;
|
||||
|
||||
// Relative motion has its own optional event and so needs its own time.
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
BitField<MouseButtonMask> pressed_button_mask;
|
||||
|
||||
MouseButton last_button_pressed = MouseButton::NONE;
|
||||
Point2i last_pressed_position;
|
||||
Point2 last_pressed_position;
|
||||
|
||||
// This is needed to check for a new double click every time.
|
||||
bool double_click_begun = false;
|
||||
@@ -325,14 +325,14 @@ public:
|
||||
};
|
||||
|
||||
struct TabletToolData {
|
||||
Point2i position;
|
||||
Point2 position;
|
||||
Vector2 tilt;
|
||||
uint32_t pressure = 0;
|
||||
|
||||
BitField<MouseButtonMask> pressed_button_mask;
|
||||
|
||||
MouseButton last_button_pressed = MouseButton::NONE;
|
||||
Point2i last_pressed_position;
|
||||
Point2 last_pressed_position;
|
||||
|
||||
bool double_click_begun = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user