mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:43:21 +08:00
Fix user-pressed keys remaining pressed whtn autoplay is turned on
This commit is contained in:
parent
294aa09c41
commit
84c7d34b77
@ -109,11 +109,21 @@ namespace osu.Game.Rulesets.UI
|
||||
get => replayInputHandler;
|
||||
set
|
||||
{
|
||||
if (replayInputHandler == value)
|
||||
return;
|
||||
|
||||
if (replayInputHandler != null)
|
||||
{
|
||||
RemoveHandler(replayInputHandler);
|
||||
// ensures that all replay keys are released, and that the last replay state is correctly cleared
|
||||
new ReplayStateReset().Apply(CurrentState, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ensures that all user-pressed keys are released, so that the replay handler may trigger them itself
|
||||
// setting `UseParentInput` will only sync releases (https://github.com/ppy/osu-framework/blob/45cd7c7c702c081334fce41e7771b9dc6481b28d/osu.Framework/Input/PassThroughInputManager.cs#L179-L182)
|
||||
SyncInputState(CreateInitialState());
|
||||
}
|
||||
|
||||
replayInputHandler = value;
|
||||
UseParentInput = replayInputHandler == null;
|
||||
|
Loading…
Reference in New Issue
Block a user