diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfieldAdjustmentContainer.cs b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfieldAdjustmentContainer.cs index 6a9e5789ded9..9f821ee93db7 100644 --- a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfieldAdjustmentContainer.cs +++ b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfieldAdjustmentContainer.cs @@ -2,8 +2,6 @@ // See the LICENCE file in the repository root for full licence text. using System; -using osu.Framework; -using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Rulesets.Taiko.Beatmaps; @@ -21,9 +19,6 @@ public partial class TaikoPlayfieldAdjustmentContainer : PlayfieldAdjustmentCont public readonly IBindable LockPlayfieldAspectRange = new BindableBool(true); - [Resolved] - private OsuGame? osuGame { get; set; } - public TaikoPlayfieldAdjustmentContainer() { RelativeSizeAxes = Axes.X; @@ -60,19 +55,7 @@ protected override void Update() // Limit the maximum relative height of the playfield to one-third of available area to avoid it masking out on extreme resolutions. relativeHeight = Math.Min(relativeHeight, 1f / 3f); - Scale = new Vector2(Math.Max((Parent!.ChildSize.Y / 768f) * (relativeHeight / base_relative_height), 1f)); - - // on mobile platforms where the base aspect ratio is wider, the taiko playfield - // needs to be scaled down to remain playable. - if (RuntimeInfo.IsMobile && osuGame != null) - { - const float base_aspect_ratio = 1024f / 768f; - float gameAspectRatio = osuGame.ScalingContainerTargetDrawSize.X / osuGame.ScalingContainerTargetDrawSize.Y; - // this magic scale is unexplainable, but required so the playfield doesn't become too zoomed out as the aspect ratio increases. - const float magic_scale = 1.25f; - Scale *= magic_scale * new Vector2(base_aspect_ratio / gameAspectRatio); - } - + Scale = new Vector2(Parent!.ChildSize.Y / 768f * (relativeHeight / base_relative_height)); Width = 1 / Scale.X; }