From 24a626a9cdc2b4fc17b81badf297f1aacf692d34 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 17 Jan 2023 15:01:01 +0900 Subject: [PATCH] Fix incorrect touch handling in autopilot and relax mods --- osu.Game.Rulesets.Osu/OsuInputManager.cs | 1 + osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/OsuInputManager.cs b/osu.Game.Rulesets.Osu/OsuInputManager.cs index 28b4f70c10..6f69fbef43 100644 --- a/osu.Game.Rulesets.Osu/OsuInputManager.cs +++ b/osu.Game.Rulesets.Osu/OsuInputManager.cs @@ -29,6 +29,7 @@ namespace osu.Game.Rulesets.Osu /// public bool AllowGameplayInputs { + get => ((OsuKeyBindingContainer)KeyBindingContainer).AllowGameplayInputs; set => ((OsuKeyBindingContainer)KeyBindingContainer).AllowGameplayInputs = value; } diff --git a/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs b/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs index 0e8dba3ab0..c75e179443 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuTouchInputMapper.cs @@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Osu.UI : OsuAction.LeftButton; // Ignore any taps which trigger an action which is already handled. But track them for potential positional input in the future. - bool shouldResultInAction = !mouseDisabled.Value && trackedTouches.All(t => t.Action != action); + bool shouldResultInAction = osuInputManager.AllowGameplayInputs && !mouseDisabled.Value && trackedTouches.All(t => t.Action != action); trackedTouches.Add(new TrackedTouch(e.Touch.Source, shouldResultInAction ? action : null)); @@ -70,6 +70,9 @@ namespace osu.Game.Rulesets.Osu.UI if (touchEvent.Touch.Source != trackedTouches.Last().Source) return; + if (!osuInputManager.AllowUserCursorMovement) + return; + new MousePositionAbsoluteInput { Position = touchEvent.ScreenSpaceTouch.Position }.Apply(osuInputManager.CurrentState, osuInputManager); }