From c2ab9b8106b6e307c54ddf5075f358d6cd4ad2c5 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Mon, 27 Jan 2025 23:12:00 +0000 Subject: [PATCH] Fix tests exploding because of PTIM sync killing indirect touch position tracking --- osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs b/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs index 577573058a..d6eec41584 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs @@ -61,7 +61,9 @@ namespace osu.Game.Rulesets.Osu.UI protected override bool OnMouseMove(MouseMoveEvent e) { - if (!updatingMousePositionFromTouch) + // MouseMoveEvents that don't move the mouse are a fluke and not from a real mouse device. They are probably from PassTroughInputManager syncing state (seen in testing). + // Ignore them since the user is not actually using a mouse or pen for aiming. + if (!updatingMousePositionFromTouch && e.ScreenSpaceMousePosition != e.ScreenSpaceLastMousePosition) { trackPositionOfIndirectTouches = false; // user is moving their mouse or pen, assume hovering play style -- position from mouse hover, clicking from touches. positionTrackingTouch = null;