Throw when getting a frame of an empty replay

This commit is contained in:
ekrctb
2021-04-12 11:17:56 +09:00
parent 4853ac802c
commit d6d8ea5b6b
4 changed files with 32 additions and 19 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@ -10,6 +11,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Framework.Input.StateChanges;
using osu.Framework.Input.StateChanges.Events;
using osu.Framework.Input.States;
using osu.Game.Configuration;
@ -100,6 +102,14 @@ namespace osu.Game.Rulesets.UI
#endregion
protected override List<IInput> GetPendingInputs()
{
if (replayInputHandler != null && !replayInputHandler.IsActive)
return new List<IInput>();
return base.GetPendingInputs();
}
#region Setting application (disables etc.)
private Bindable<bool> mouseDisabled;