Enable high chat polling rate

This commit is contained in:
Dan Balasescu 2022-02-25 16:03:46 +09:00
parent f9d9ad388b
commit 48ed9c6144
3 changed files with 15 additions and 1 deletions

View File

@ -838,7 +838,8 @@ void updateChatPollRate()
channelManager.HighPollRate.Value =
chatOverlay.State.Value == Visibility.Visible
|| API.Activity.Value is UserActivity.InLobby
|| API.Activity.Value is UserActivity.InMultiplayerGame;
|| API.Activity.Value is UserActivity.InMultiplayerGame
|| API.Activity.Value is UserActivity.SpectatingMultiplayerGame;
}
Add(difficultyRecommender);

View File

@ -16,6 +16,7 @@
using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Spectate;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
@ -36,6 +37,8 @@ public class MultiSpectatorScreen : SpectatorScreen
/// </summary>
public bool AllPlayersLoaded => instances.All(p => p?.PlayerLoaded == true);
protected override UserActivity InitialActivity => new UserActivity.SpectatingMultiplayerGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
[Resolved]
private OsuColour colours { get; set; }

View File

@ -50,6 +50,16 @@ public InMultiplayerGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
public override string Status => $@"{base.Status} with others";
}
public class SpectatingMultiplayerGame : InGame
{
public SpectatingMultiplayerGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
: base(beatmapInfo, ruleset)
{
}
public override string Status => $"Watching others {base.Status.ToLowerInvariant()}";
}
public class InPlaylistGame : InGame
{
public InPlaylistGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)