1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:02:55 +08:00

Make OsuUserInputManager dependency nullable for tournament client

This commit is contained in:
Salman Ahmed 2022-10-12 17:55:32 +03:00
parent 7a6ecaff0d
commit 6199db11a2

View File

@ -47,7 +47,7 @@ namespace osu.Game.Graphics.Cursor
}
[Resolved]
private OsuUserInputManager inputManager { get; set; } = null!;
private OsuUserInputManager? inputManager { get; set; }
[Resolved]
private OsuGame? game { get; set; }
@ -63,8 +63,11 @@ namespace osu.Game.Graphics.Cursor
internalState.ValueChanged += onInternalStateChanged;
mouseInputSource.BindTo(inputManager.IsMouseInputSource);
mouseInputSource.BindValueChanged(_ => updateInternalVisibility(), true);
if (inputManager != null)
{
mouseInputSource.BindTo(inputManager.IsMouseInputSource);
mouseInputSource.BindValueChanged(_ => updateInternalVisibility(), true);
}
if (game != null)
{