1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Fix incorrect touch handling in autopilot and relax mods

This commit is contained in:
Dean Herbert 2023-01-17 15:01:01 +09:00
parent 490f539c43
commit 24a626a9cd
2 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,7 @@ namespace osu.Game.Rulesets.Osu
/// </remarks>
public bool AllowGameplayInputs
{
get => ((OsuKeyBindingContainer)KeyBindingContainer).AllowGameplayInputs;
set => ((OsuKeyBindingContainer)KeyBindingContainer).AllowGameplayInputs = value;
}

View File

@ -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);
}