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.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Input.StateChanges.Events;
|
using osu.Framework.Input.StateChanges.Events;
|
||||||
|
@ -44,8 +45,10 @@ protected override bool HandleMouseTouchStateChange(TouchStateChangeEvent e)
|
||||||
{
|
{
|
||||||
if (!AllowUserCursorMovement)
|
if (!AllowUserCursorMovement)
|
||||||
{
|
{
|
||||||
// Still allow for forwarding of the "touch" part, but block the positional data.
|
// Still allow for forwarding of the "touch" part, but replace the positional data with that of the mouse.
|
||||||
e = new TouchStateChangeEvent(e.State, e.Input, e.Touch, false, null);
|
// 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);
|
return base.HandleMouseTouchStateChange(e);
|
||||||
|
|
Loading…
Reference in New Issue