mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #94021 from Riteo/scale-is-relative
Wayland: Scale relative pointer motion
This commit is contained in:
commit
f3af22b10b
@ -2049,9 +2049,14 @@ void WaylandThread::_wp_relative_pointer_on_relative_motion(void *data, struct z
|
|||||||
|
|
||||||
PointerData &pd = ss->pointer_data_buffer;
|
PointerData &pd = ss->pointer_data_buffer;
|
||||||
|
|
||||||
|
WindowState *ws = wl_surface_get_window_state(ss->pointed_surface);
|
||||||
|
ERR_FAIL_NULL(ws);
|
||||||
|
|
||||||
pd.relative_motion.x = wl_fixed_to_double(dx);
|
pd.relative_motion.x = wl_fixed_to_double(dx);
|
||||||
pd.relative_motion.y = wl_fixed_to_double(dy);
|
pd.relative_motion.y = wl_fixed_to_double(dy);
|
||||||
|
|
||||||
|
pd.relative_motion *= window_state_get_scale_factor(ws);
|
||||||
|
|
||||||
pd.relative_motion_time = uptime_lo;
|
pd.relative_motion_time = uptime_lo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user