mirror of https://github.com/ppy/osu
Avoid blocking `Active` state propagation
This commit is contained in:
parent
6bffeb6a24
commit
abb617a3df
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Input.StateChanges.Events;
|
||||
|
@ -44,8 +45,10 @@ protected override bool HandleMouseTouchStateChange(TouchStateChangeEvent e)
|
|||
{
|
||||
if (!AllowUserCursorMovement)
|
||||
{
|
||||
// Still allow for forwarding of the "touch" part, but block the positional data.
|
||||
e = new TouchStateChangeEvent(e.State, e.Input, e.Touch, false, null);
|
||||
// Still allow for forwarding of the "touch" part, but replace the positional data with that of the mouse.
|
||||
// Primarily relied upon by the "autopilot" osu! mod.
|
||||
var touch = new Touch(e.Touch.Source, CurrentState.Mouse.Position);
|
||||
e = new TouchStateChangeEvent(e.State, e.Input, touch, e.IsActive, null);
|
||||
}
|
||||
|
||||
return base.HandleMouseTouchStateChange(e);
|
||||
|
|
Loading…
Reference in New Issue