1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +08:00

Cache input manager

This commit is contained in:
Dean Herbert 2019-01-23 20:37:56 +09:00
parent 4c8e7a26dc
commit 7415a6e764

View File

@ -221,9 +221,7 @@ namespace osu.Game
return;
}
var databasedSet = beatmap.OnlineBeatmapSetID != null ?
BeatmapManager.QueryBeatmapSet(s => s.OnlineBeatmapSetID == beatmap.OnlineBeatmapSetID) :
BeatmapManager.QueryBeatmapSet(s => s.Hash == beatmap.Hash);
var databasedSet = beatmap.OnlineBeatmapSetID != null ? BeatmapManager.QueryBeatmapSet(s => s.OnlineBeatmapSetID == beatmap.OnlineBeatmapSetID) : BeatmapManager.QueryBeatmapSet(s => s.Hash == beatmap.Hash);
if (databasedSet != null)
{
@ -520,12 +518,20 @@ namespace osu.Game
public class GameIdleTracker : IdleTracker
{
private InputManager inputManager;
public GameIdleTracker(int time)
: base(time)
{
}
protected override bool AllowIdle => GetContainingInputManager().FocusedDrawable == null;
protected override void LoadComplete()
{
base.LoadComplete();
inputManager = GetContainingInputManager();
}
protected override bool AllowIdle => inputManager.FocusedDrawable == null;
}
private void forwardLoggedErrorsToNotifications()